[英]Batch script to move file from scource to destination folder for files older than 30 day
i want to create the batch script which could copy the 30 days older files from one folder to another. 我想创建可以将30天以前的文件从一个文件夹复制到另一个文件夹的批处理脚本。 And also deletes the 30 days old files from the source folder after copying to the destination folder
复制到目标文件夹后,还会从源文件夹中删除30天的旧文件
forfiles /p "c:\sourceFolder" /S /D -30 /C "cmd /c robocopy "C:\DestinationFolder" "C:\sourceFolder" /mir @file : date>=30 days=nul"
Nothing has happened, not even error message is displayed 什么也没发生,甚至没有错误信息显示
robocopy sourceFolder targetFolder * /s /mov /minage:30 /l
如果列表正确,请从命令中删除/ l(仅列表)以进行移动
This robocopy only moves a few files and deleted my rar packages? 该robocopy仅移动了几个文件并删除了我的rar包? not working at all as I would like to.
根本不像我想要的那样工作。 I just want it to work as user3302083 wants.
我只希望它能按照user3302083的要求工作。 Just move folder that is 2 days old no other changes.
只需移动2天的文件夹就可以了。 Now I tried and it moved just a few files and deleted.
现在我尝试了一下,它只移动了几个文件并删除了。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.