|
Answer» I'm trying to move files based on their AGE and from what I've learned from other posts on this forum but have run into a wall.
In my example I'm wanting to move .mp3 files from a directory to a sub-directory:
FORFILES /M *.mp3 /D -15 /C "CMD /C MOVE @File C:\Music\Temp"
The batch file is in the directory C:\Music, which is where the .mp3 files are located.
I'm doing this on a Windows 8 Pro machine.
Thanks for any assistance!I MAY have answered my own question: This doesn't work on Windows 8. Just tried it on a Win 7 OS and was successful.
I guess I should have taken the notes at their word...
Thanks to anyone who puzzled over this!Forfiles comes with Windows 8 so it should work.
Your command will fail on filenames with long filename elements - try this (UNTESTED):
Code: [Select]FORFILES /M *.mp3 /D -15 /C "CMD /C MOVE 0X2[emailprotected] C:\Music\Temp"Thanks! I'm not SURE why it worked in the original format on Windows 7. I thought it was weird that Windows 8 would take a stop backwards...
Thanks again for your response! I'll try it.
Kevin
|