johnnyg123
asked on
Recursively Delete Files
I have a file structure that looks similar to following:
2016
Jan
Feb
Mar
...
Dec
There are a bunch of sub folders within each month
Lots of files within each folder
I was hoping to copy the structure for 2017 since there are so many folders
Is there a simple way to delete the files....so I'm left with just the folders
Without having to check each folder and manually delete any files
Perhaps a script of some sort
2016
Jan
Feb
Mar
...
Dec
There are a bunch of sub folders within each month
Lots of files within each folder
I was hoping to copy the structure for 2017 since there are so many folders
Is there a simple way to delete the files....so I'm left with just the folders
Without having to check each folder and manually delete any files
Perhaps a script of some sort
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks to all who contributed!
ASKER
I ended up using the xcopy solution since that had the least risk of deleting anything. But the other responses did answer the question I asked and could be useful in future as well