![]() |
![]() OCAU News - Wiki - QuickLinks - Pix - Sponsors |
|
|||||||
| Notices |
|
Sign up for a free OCAU account and this ad will go away! Search our forums with Google: |
![]() |
|
|
Thread Tools |
|
|
#1 |
|
Member
Join Date: Nov 2006
Location: 3000
Posts: 1,441
|
I have a text file with 100's of file names and I need to create a folder for each file.
Apart from creating manually 100's of folders and then renaming them, I was hoping (praying) someone could recommend software that could do this?? |
|
|
|
| Join OCAU to remove this ad! |
|
|
#2 |
|
Member
Join Date: Jan 2005
Location: Victoria
Posts: 243
|
you could copy and paste the names into excel.
then concatenate the name of the folder to make mkdir foldername then turn it into a batch file and run it |
|
|
|
|
|
#3 |
|
Member
Join Date: Oct 2002
Posts: 8,022
|
test.txt:
Code:
test.txt test1.txt test2.txt test3.txt Code:
for /f %a in (test.txt) do mkdir %~na |
|
|
|
|
|
#4 |
|
Member
Join Date: Mar 2002
Location: Syd
Posts: 1,439
|
batch files will do it , loop through the text file
search batch editing ini files (will provide closer results) 'directories' as well as 'folders' things to watch out for: illegal characters and folder names being too long. heres a link that should get you started |
|
|
|
|
|
#5 |
|
Member
Join Date: Aug 2003
Location: Perth 6060
Posts: 145
|
|
|
|
|
|
|
#6 |
|
Member
Join Date: Jul 2001
Location: Adelaide
Posts: 617
|
Powershell makes this pretty simple
Code:
Get-Content textFile.txt | % { mkdir $_ }
Code:
Get-Content textFile.txt | % { mkdir $_.SubString(0,$_.LastIndexOf(".")) }
__________________
"Racing is...... life. Everything else before, everthing after, is just waiting" - Steve McQueen |
|
|
|
![]() |
| Bookmarks |
|
Sign up for a free OCAU account and this ad will go away! |
| Thread Tools | |
|
|