Link to home
Start Free TrialLog in
Avatar of aflat362
aflat362

asked on

Move Files based on date Batch File

Hi,

Is there a way to tell what the DateLastModified date for a file is in Win 2K command Line?

My goal is to have a batch file that does the following:

Move All Files From directory X that have a DateLastModified Date which is older than 7 days to Directory Y.

The directory paths and the file retention date can be hard-coded.  Or if you have a better idea that would be cool too but I figure hard coding would be easiest.

I can do this in VBS, VB, C++ already but I want to learn more about Batch Scripting and this seems like it would be a good exercise.

Thanks!
Avatar of aflat362
aflat362

ASKER

ALSO

Bonus 20 points if you can tell me how to

Move all files from directory X that have a last modified date of YYYY-MM-DD to directory Y

In a Batch file.
ASKER CERTIFIED SOLUTION
Avatar of danich
danich

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial