I have about 200 files in a folder, I need each file in a separate folder of its own, with the folder named the same as the file... Is there a program that can save me time
Basically you'll end up with 2 batch files, the first creates a folder called dump which is where all the folders and files will end up, it then scans the current folder and the calls the second batch file with the name of each file in turn, the second batch file then makes a folder using the name of the file and then moves the file into that folder.
As both these batch file sit in the same folder and the batch files fairly stoopid they'll be moved into the dump folder too. I'd suggest you try it on a test set of files rather then the target and modify the file(s) as required.
If you have python installed put this script in the dir you want to do then run python filename.py (You may want to test it works on windows ok first on a different directory in case it hoses your filesystem )
Code:
import os
import shutil
dirs = os.listdir(".")
for file in dirs:
if os.path.isfile(file):
newpath = os.mkdir(file + "new")
shutil.move(file,file+"new")
os.rename(file+"new",file)
Edit: Infact just use that batch script above, will do what you want and not depend on python.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.