move all files creates on a specific date using forfiles

G

Guest

I need to have the forfiles utility (windows 2000 version) move all files
created on a specific day moved to a folder. How would I script the command?
It seems that forfiles can only accept "older than" or "newer than" options
for the -d switch but not the exact day? Or I must be doing something else
wrong?

I tried to do this: forfiles -p"C:\folder\Bounce Management\bounces" -m*.msg
-d091304 -c"CMD move c:\folder"

Thanks for your help!
 
P

Pegasus \(MVP\)

Moshe Rosenberg said:
I need to have the forfiles utility (windows 2000 version) move all files
created on a specific day moved to a folder. How would I script the command?
It seems that forfiles can only accept "older than" or "newer than" options
for the -d switch but not the exact day? Or I must be doing something else
wrong?

I tried to do this: forfiles -p"C:\folder\Bounce Management\bounces" -m*.msg
-d091304 -c"CMD move c:\folder"

Thanks for your help!

forfiles.exe is a rather curious command, and I think you are correct
when you say that it lacks a switch for "date=". I recommend you
use xxcopy.exe instead. This command does come with the required
switch (/DS). You can freely download it from the Internet for personal
use.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top