Reputation: 51
My FTP mget
command is overwriting file modification timestamp, which actually I don't want.
Please help me on this.
Copy.bat
open 10.198.37.61
user
password
mget *.*
disconnect
quit
Main.bat
ftp -i -s:Copy.bat
Upvotes: 2
Views: 5317
Reputation: 59
CoreFTP LE (or PRO) can preserve timestamp - FTP or SFTP
To configure CoreFTP LE:
Site Manager -> Advanced -> General -> Convert Files to GMT (mark it)
Site Manager -> Advanced -> Transfers -> Use MFMT for date modify (mark it)
Done!
Upvotes: -1
Reputation: 202271
The Windows built-in FTP client (ftp.exe
) cannot preserve timestamp of remote file when downloading (and vice versa).
You have to use another FTP client. Most other FTP clients do preserve the timestamp.
For example with WinSCP scripting use the following batch file (Main.bat
):
winscp.com /ini=nul /log=script.log /command ^
"open ftp://user:[email protected]/" ^
"get *.*" ^
"exit"
See also Converting Windows FTP script to WinSCP script.
(I'm the author of WinSCP)
Upvotes: 2