Loading ...
Sorry, an error occurred while loading the content.

Batchfile to rename multiple files on FTP-location

Expand Messages
  • igorkerstges
    Hiall, Scenario: my contact puts files with sequential numbers on an FTP location and my batch-script is running in 5 minute interval to get these files and
    Message 1 of 1 , Oct 1, 2004
    • 0 Attachment
      Hiall,
      Scenario: my contact puts files with sequential numbers on an FTP
      location and my batch-script is running in 5 minute interval to get
      these files and delete the files after they have been downloaded.

      Currently I use a batchfile with an ftp-script that does:

      ....
      echo off
      mget [filename]*.txt
      mdel [filename]*.txt
      ....

      But the problem is that this will destroy any files that were put on
      the ftp-location during my download.

      I would prefer to rename the files, thén download the renamed files
      and delete renamed files after download is completed.

      In FTP-commands, there is no such thing as 'mrename', so I cannot use
      wildcards to rename multiple files on an FTP-server.

      I would need something like:

      mrename [filename]*.txt Download_[filename]*.txt


      Any suggestions?

      Kind regards,
      Igor Kerstges.
    Your message has been successfully submitted and would be delivered to recipients shortly.