Create folder based on file names
#1
I have over 500 movies that are all thrown together sloppily with their .nfo and .tbn files in one folder. I want a program or command that will create a folder based on each movie and then add files of similar name to that folder.

So far I have found this: http://www.monkeyjob.com/FileMonk/FMExam...e-Name.htm

and then this XP script, but I am running win7:
http://www.computing.net/answers/windows...55238.html

Surely someone has needed this before!
Reply
#2
Star 
I've used this one.... cut&paste it into notebook file and call it foldermaker.bat but it will make a folder of everything including itself and stick the files inside.

Test it out... in a 'test' folder with a few files...

@echo off
for %%a in (*.*) do (
md "%%~na" 2>nul
move "%%a" "%%~na"
)
pause
Reply
#3
PatK Wrote:I've used this one.... cut&paste it into notebook file and call it foldermaker.bat but it will make a folder of everything including itself and stick the files inside.

Test it out... in a 'test' folder with a few files...

@echo off
for %%a in (*.*) do (
md "%%~na" 2>nul
move "%%a" "%%~na"
)
pause

Cool thx i will give it a shot later.

But wait, it will create a new folder for each file? I need one folder and then like files to be placed in it...
Reply
#4
Code:
@echo off
for %%a in (*.nfo) do (
md "%%~na" 2>nul
move "%%~na.*" "%%~na"
)

i don't speak batch (or well, i haven't since 1998 or thereabout), but if i decoded the original code this should do it.
Reply
#5
Look here.

It's what you are looking for

G
Reply
#6
getafix Wrote:Look here.

It's what you are looking for

G

Nice! I wonder though if the files have to have the exact same names, but with different extensions? Or will it use *like* names?

spiff Wrote:
Code:
@echo off
for %%a in (*.nfo) do (
md "%%~na" 2>nul
move "%%~na.*" "%%~na"
)

i don't speak batch (or well, i haven't since 1998 or thereabout), but if i decoded the original code this should do it.

Cool. Appreciate it.
Reply
#7
maw230 Wrote:Nice! I wonder though if the files have to have the exact same names, but with different extensions? Or will it use *like* names?

No, I think that it makes an exact copy excluding the extensions. I haven't used it in a while but I remember it working perfectly
Reply
#8
getafix Wrote:No, I think that it makes an exact copy excluding the extensions. I haven't used it in a while but I remember it working perfectly

Only one way to find out.
Reply



Logout Mark Read Team Forum Stats Members Help
Create folder based on file names1
This forum uses Lukasz Tkacz MyBB addons.