Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FTP Question - Renaming Mulitple Files

Status
Not open for further replies.

marksmithy69

Programmer
Apr 20, 2001
60
0
0
CA
Hi. I am not even sure this is the correct forum to be asking this question, so I appologize if it is not.

If I ftp from a Windows 2000 server to a remote Unix server, is there a way that I can rename all files in a directory with a .log extension to a .aud extension?

This will be done via a DOS batch script. The names of files will not always be the same, and I know I can't do a "rename *.log *.aud" since ftp will actually look for a file named *.log. Any suggestions. Thanks a lot.
 
You may have a reason why you have to do this in the FTP process, but why not just rename the files in a UNIX script on the server prior to the FTP script kicking off from the Windows 2000 Server? If it runs at the same time every day, just use CRON to schedule it before the FTP process.
 
We were hoping to avoid this route because our ftp script will be looping through hundreds of servers, which means we will have to have a unix script on each of the servers. It could easily be done, but a little more cumbersome than we had hoped. Thanks for the response though.
 
I see, I thought you were just talking one Unix server. That doesn't sound like something that's inherent in the ftp program's abilities. Have you looked into using Perl? There is a NET::FTP module available. Perl is way more robust for this type of stuff than your basic DOS functionalities - and there's a forum here on tek-tips.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top