troubleshooting Question

Sorting files by folder with .cmd line.

Avatar of new_to_networks
new_to_networksFlag for United States of America asked on
Windows OSShell ScriptingWindows Server 2008
15 Comments1 Solution702 ViewsLast Modified:
What would I put for a .cmd script where I want to move all the files from one directory to another, but when they reach their destination they are all sorted out in folders by date created? So they're all just together in one folder, but when I move them to the archived folder, there will be subfolders that contain them by date. So in the new folder, there would be subfolders that look like:


And they would contain the files from those dates. The files themselves are actually named by date. So a file is named 20110601, 20110602. I know how to move files and create directories from the cmd line, but I don't know how to tell it to create all the folders needed to sort these files by their individual dates and then how to send the files to their respective subfolders. Any help would be much appreciated.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 15 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros