I need to make a batch file that can copy files from one path to another based on parameters.
For example, typing “datecopy -m 8 c:/copyfrom/*.* d:/copyto/*.*”, would find all files in c:/copyfrom dated less than 8 months old, and copy them to d:/copyto -folder. Alternately, instead of -m for month, I could use -h for hour or -y for year.
That’s not the full program of course, but should get me started. Thanks for any potential tips. 🙂
I know this might not look like it’s answering your question, but save yourself more pain and heartache than you can imagine by doing this in jscript or VbScript
Lately I’ve been looking at Windows Powershell, basically Windows Scripting on speed.
However you can be assured that Windows Script Host (jscript & VBScript) is already on Windows from XP onwards (possibly from W2k onwards).
My advice is to NOT use windows batch commands.