Re: copy and move files



On 29 mrt, 15:08, "Beliavsky" <beliav...@xxxxxxx> wrote:
On Mar 29, 7:19 am, "Arjen Markus" <arjen.mar...@xxxxxxxxxx> wrote:





On 29 mrt, 12:03, "Fluid" <bernardini.chi...@xxxxxxxxx> wrote:

Hi, i need help.i am a quite new user of fortran. I would like to
rename a file (used as input file) and move it to another directory.
Which command can I use?
thanks

Fortran is not really suited for this type of tasks.
What you can do is one of the following:

1. Use the "system" subroutine. It is a common extension to
the standard. You can use it to run system commands:

character*100 command
write( command, '(4a)' ) 'copy ', file1, ' ', file2
call system(command)

call system("copy " // trim(file1) // " " // trim(file2))

is more concise and more general, since it will work even if the file
names are long- Tekst uit oorspronkelijk bericht niet weergeven -

- Tekst uit oorspronkelijk bericht weergeven -

Oops, you are right - you might even add '"' around the file names
to get it absolutely (?) foolproof.

Regards,

Arjen

.



Relevant Pages

  • Re: cmd problem
    ... Panel>add/remove programs/add utilities from my XP disk. ... Try this command, but change the X: ... Can't open input file: filename. ...
    (microsoft.public.windowsxp.basics)
  • Re: findstr, for, or other command to do this?
    ... >> thoughout the file. ... >> command gets me close but its not a unique list. ... > Input file in.txt: ... > REM Parse thru the sorted temp file and compare each ...
    (microsoft.public.win2000.cmdprompt.admin)
  • Re: Nero AAC encoder front-end
    ... I think this is actually an issue with Nero and Windows ME, ... I can't seem to get it to work from the command line either, ... You could try some older Nero encoder and decoder files if the ... I even put the executable in the same folder as the input file 003.wav ...
    (alt.radio.digital)
  • Re: Nero AAC encoder front-end
    ... The command prompt window simply opened and then immediately closed ... I think this is actually an issue with Nero and Windows ME, ... You could try some older Nero encoder and decoder files if the latest ones aren't working with ME. ... I even put the executable in the same folder as the input file 003.wav and ran a batch file containing the following commands. ...
    (alt.radio.digital)
  • Re: opening existing files with OPEN()
    ... was getting the program to read this format correctly. ... Command Prompt, I see both the executable AND the input file when I do ... no matching symbolic information found. ...
    (comp.lang.fortran)