Link to home
Start Free TrialLog in
Avatar of mike-9
mike-9

asked on

Need some help with a batch file to creating sub-folders in a directory

Hello,

I have some reports that I save on a network share.  There is a report for every calendar date and I want each report in its own sub folder.  We'll be manually saving the reports to the share after download.  

Is there a way to create a batch file that would automatically create these sub-folders using the naming convention of "MMDDYY".  I am looking to avoid having my users manually create a new folder every day.


Thanks,
ASKER CERTIFIED SOLUTION
Avatar of Semper Phi
Semper Phi
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
SOLUTION
Avatar of Lionel MM
Lionel MM
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 mike-9
mike-9

ASKER

I was looking for a daily or even monthly batch file to create the folders and sub folders on a server share.

I wound up finding a solution that worked for me.  It is simplistic.

I wound up just using excel to create the folder structure.  Column A was the MD command.  Column B was my folder.  Column C was a sub folder.  Column D was my date.  It was easy to drag down the column to get my consecutive dates.  I exported the whole thing as a text file and ran it as a batch.  

It's not completely automated but I could set up a decade of folders in a few minutes.  

I'm going to check out SemperPhi's solution just to increase my knowledge of the subject.