Renaming files from *.ACK to *.RED [FTP]

Status
Not open for further replies.

The_Unbeliever

Honorary Master
Joined
Apr 19, 2005
Messages
103,193
Reaction score
10,233
Location
Nkaaaaandla
Hi All

Do anybody know how to bulk rename files during an ftp operation?

When we download files with an .ACK extension, we want to rename same to *.RED

Platform is Windows XP.

TIA

Ook
 
Hi All

Do anybody know how to bulk rename files during an ftp operation?

When we download files with an .ACK extension, we want to rename same to *.RED

Platform is Windows XP.

TIA

Ook

Sis why arent you doing it with a linux box? :p
afaik you should be able to mget *.ACK *.RED, as specifying a space will rename the file through the basic FTP client.
So get somefile.ACK somefile.RED will rename it when pulling it, not 100% sure if it will do that with wildcards specified though.
I normally do that stuff as a process in the linux scripts...

Otherwise powershell could quite happily do it, its way more advanced for scripting than doing batch scripts.
 
Sis why arent you doing it with a linux box? :p
afaik you should be able to mget *.ACK *.RED, as specifying a space will rename the file through the basic FTP client.
So get somefile.ACK somefile.RED will rename it when pulling it, not 100% sure if it will do that with wildcards specified though.
I normally do that stuff as a process in the linux scripts...

Otherwise powershell could quite happily do it, its way more advanced for scripting than doing batch scripts.

Will try the mget command...
 
Sorted.

WinSCP command-line helped a lot :D

Here's a script file :

Code:
option batch on
option confirm off
open ftp://user:password@<serverIP> or <serverURL>
get -transfer=binary *.ack
mv *.ack *.red
exit

Use it with the /script switch, eg

winscp /script=script.txt

For better results, put c:\program files\winscp in your path, so you can call winscp from anywhere you need.
 
Status
Not open for further replies.
Top
Sign up to the MyBroadband newsletter
X