vendredi 26 décembre 2014

Using FTP command how to fetch today's file


"Fetching data from server by FTP command" is not a problem .But if I like to fetch the today's file from the server ,whose name is Like(BACKUP20141210) and if it presents in a folder with previous dated backup files like(BACKUP20141209,BACKUP20141208,...),what kind of FTP script is suitable here. Here, I share my FTP script



open myftp.myserver.com
myusername
mypassword
lcd "c:\myfolder"
cd webfolder
for /f "tokens=2-4 delims=/ " %%a in ('echo %date%') do echo get myfile%%a%%b%%c


But I get an "Invalid command" response with the "for /f "tokens=2-4 delims=/ " %%a in ('echo %date%') do echo get myfile%%a%%b%%c" line.and it stops.


Can anyone suggest any relative answer of it.





Aucun commentaire:

Enregistrer un commentaire