Move file to folder with same name as file

Post any Bulk Rename Utility support requirements here. Open to all registered users.

Move file to folder with same name as file

Postby NewBorn » Fri Oct 15, 2021 12:16 pm

Need to move many files into a folder with same name as the file minus file extension.
NewBorn
 
Posts: 18
Joined: Sun Mar 01, 2020 9:22 am

Re: Move file to folder with same name as file

Postby therube » Fri Oct 15, 2021 4:34 pm

From outside of BRU...


From a command prompt, something like this might work:

test.bat
Code: Select all
for %i in (*.*) do md        "%~ni"
for %i in (*.*) do move "%i" "%~ni"

Above will fail if a filename has no extension.


Set up a test location with some sample data & try it.
therube
 
Posts: 1314
Joined: Mon Jan 18, 2016 6:23 pm

Re: Move file to same named folder

Postby Luuk » Fri Oct 15, 2021 5:26 pm

Also, this link can have some other ways to conduct the same...
viewtopic.php?f=2&t=5621
Luuk
 
Posts: 690
Joined: Fri Feb 21, 2020 10:58 pm


Return to BRU Support