Re: copy and move files



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

.



Relevant Pages

  • Re: Enviroment Variables issue
    ... I am having trouble with system commands from the command prompt or ... If I try to run a system command, such as ping, traceroute, ...
    (microsoft.public.windowsxp.general)
  • Re: copy and move files
    ... rename a file (used as input file) and move it to another directory. ... Which command can I use? ... Fortran is not really suited for this type of tasks. ...
    (comp.lang.fortran)
  • Re: writing array to file?
    ... to three system commands, it would be: ... You seem unusually dependent on shelling out to external programs. ... Perl is more than a shell scripting language. ... This says to run the command between ``, ...
    (comp.lang.perl.misc)
  • Re: Edit Windows PATH
    ... On Fri, 1 Jan 1988, amr wrote: ... Is there a reason that a simple systemcommand won't work here? ... Normally I'm opposed to using system commands when the task can be done ...
    (perl.beginners)
  • Re: Moving command.com out of system32 directory
    ... > What is the rationale for moving the dos command shell out ... system commands on your system if they know or can guess the location of the ... [CMD.EXE is the DOS shell that comes with Windows ...
    (microsoft.public.inetserver.iis.security)