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
FalconTwoAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NVITCommented:
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

0
Thomas Zucker-ScharffSolution GuideCommented:
in other words use Robocopy
0
NVITCommented:
To preserve the source tree...
@echo off
set src=C:\source\dir1\dir2
set dst=C:\destination
for /f "tokens=1* delims=:" %%a in ("%src%") do (
  set dst_sfx=%%b
)
robocopy "%src%" "%dst%%dst_sfx%" /e /MINAGE:20151231 /MAXAGE:20150101

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

FalconTwoAuthor Commented:
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
0
NVITCommented:
Yes.
0
NVITCommented:
> ...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.
0
FalconTwoAuthor Commented:
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
0
Thomas Zucker-ScharffSolution GuideCommented:
Have you tried using AutoIT?
0
Thomas Zucker-ScharffSolution GuideCommented:
More recently I have been using AutoHotKey.
0
FalconTwoAuthor Commented:
I appreciate the assistance from Thomas Zucker-Scharff and NewVillageIT (NVIT). I will try using the Autohotkey and get back to you
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
System Utilities

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.