ftp
open host
username
password
binary
prompt
cd /home/
lcd c:\
mget *txt
disconnect
bye
i want to download only today files from ftp.can you pls tell me what should i change?
How to download only today files from ftp using batch script?
Moderator: DosItHelp
Re: How to download only today files from ftp using batch script?
If the files have a date stamp in their name, you can have your batch file determine the date and use it as part of your mget line. If they don't, you'll have to connect once and output the results of a dir command to a text file, and then parse the dates from that file to create a list of files and add them individually to a script file that is passed to the ftp program.
Re: How to download only today files from ftp using batch script?
Another possibility is to download only files that don't exist in the local target.
https://www.dostips.com/DtTipsFtpBatchS ... lyNewFiles
Steffen
https://www.dostips.com/DtTipsFtpBatchS ... lyNewFiles
Steffen