Samoin
asked on
MS Dos Command to Copy
Hi Experts,
I'm trying to using ms dos to copy files between two given dates, is there a specific command for that? I already tried using /D with xcopy but it copies files changed on or after the specified date. Any help will be greatly appreciated.
Thanks
I'm trying to using ms dos to copy files between two given dates, is there a specific command for that? I already tried using /D with xcopy but it copies files changed on or after the specified date. Any help will be greatly appreciated.
Thanks
Agreed there is no baseline DOS command to do the date range copy you seek. ROBOCOPY is a good alternative, which is a free addon utility Microsoft create a while back and made available through windows resource kits. It is now included as part of Windows 7 also. But depending on your Windows version you may have to download and install it.
Since you will need to run something other than just DOS commands to do this, another approach would be a rather small vbscript that could do the date range checking and copy the matching files easily. Let me know if you are interested in seeing a sample of that approach.
~bp
Since you will need to run something other than just DOS commands to do this, another approach would be a rather small vbscript that could do the date range checking and copy the matching files easily. Let me know if you are interested in seeing a sample of that approach.
~bp
ASKER
@billprew
Can you please forward me the sample script.
Thanks
Can you please forward me the sample script.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks much, glad that helped.
~bp
~bp
robocopy c:\source c:\destination *.* /MAXAGE:20101231 /MINAGE:20111001