简体   繁体   English

批处理文件,仅下载今天的文件

[英]batch files to download only today file

i am having 'n' of files in folder with different date, but i want to download only today's file.please help me out in this.there is no date format in file name, based on the modification date only i have to download the file through FTP, 我的文件夹中有'n'个具有不同日期的文件,但是我只想下载今天的文件。请在此帮助我。文件名中没有日期格式,仅基于修改日期即可下载通过FTP文件

please help me out. 请帮帮我。

Thanks 谢谢

Selva 塞尔瓦

You can use the forfiles command to get the files which are only one day older or are modified only today. 您可以使用forfiles命令获取仅一天前或仅在今天修改的文件。

for eg. 例如 if you want to download some files from a folder(source_folder) which are modified today then to your folder(destination_folder): 如果要从今天修改的文件夹(source_folder)下载一些文件,则将其下载到您的文件夹(destination_folder):

forfiles /P %path to source_folder%  /M *.txt  /D -0 /C "cmd copy @fname %path_of_destination_folder% "

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM