Link to home
Start Free TrialLog in
Avatar of FalconTwo
FalconTwo

asked on

Looking for a File Copy Utility

All I an looking for a file copy utility that can the following

Copy/move source files based on date (year)  to a destination folder but I want the folder tree to remain intact

So if I copy sub-folders deep within a folder, I want to preserve the tree
Avatar of NVIT
NVIT
Flag of United States of America image

How about  this? Save the following code to a .bat file.
It copies 2015 files and folders.
set src=C:\source
set dst=C:\destination
robocopy "%src%" "%dst%" /s /MINAGE:20151231 /MAXAGE:20150101

Open in new window

in other words use Robocopy
ASKER CERTIFIED SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

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
Avatar of FalconTwo
FalconTwo

ASKER

OK so if I start the copy from deep within the clients folder (The top folder is Clients with tons of sub folders)  and my destination is clients of course. So for set dst=c:\clients will drop the source files under that clients folder preserving the tree?

I will try this tomorrow
Yes.
> ...if I start the copy from deep within the clients folder (The top folder is Clients with tons of sub folders)  and my destination is clients of course. So for set dst=c:\clients will drop the source files under that clients folder

Sounds like you're saying Dst is below Src. If so, that may cause problems.

If Src=c:\clients\dir1\dir1a\deep1\deeper
...or something like that.
...and Dst=c:\clients\destinationonly
...or something like that, it should be fine.

As long as Src is outside of the c:\clients\destinationonly branch, it should work.
Just discover another problem when I tried to run this, The client folder contains over 15,000 files with 3, 112 folders same as my reports folder that contain 152,702 files with 29,802 folders

It;s a pain clicking thru all the folder to determine which folder is year 2010 and older
I would like to perform a search for any file/folder with a date stamp of 2010 or older and move it to the new destination on another server but I would like to preserve the tree. Can that be done?

Reason being is anyone looking for files will have an idea where to look
SOLUTION
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
SOLUTION
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
I appreciate the assistance from Thomas Zucker-Scharff and NewVillageIT (NVIT). I will try using the Autohotkey and get back to you