Batch folder creation based on file name

Advanced Renamer forum
#1 : 01/09-14 17:24
Matthew
Matthew
Posts: 1
Hi, maybe the program already supports this, but please can you confirm if this is possible? I'll happily donate if you can solve my problem :)

I have 829 files within a folder structure up to 3 folders deep. I need to create a folder in the same directory as every file with the same name as the file.

For example:

Folder 1 > Folder 1a > Folder 1b >

Material1.jpg
Material2.jpg
Material3.jpg

Inside 'Folder 1b' I need folders created called 'Material1' + 'Material2' + 'Material3'

Ideally the solution could scan all directories from the base folder (Folder 1 in the example above) and create the folders in a single task, instead of having to move through all the end folders one at a time.

Is this possible? desperate for a solution!


01/09-14 17:24
#2 : 12/09-14 23:11
Stefan
Stefan
Posts: 274
Reply to #1:

Therefore one would use the tools of the operation system: a DOS-Batch or a PowerShell script.

First you have to define the rule in plain English words, as e.g.:

start at main folder
- foreach subfolder do
- foreach subfolder do
- foreach file do: create a folder from the file basename.



Then you can create (or ask for) the script.

Interesting challenge.


 


12/09-14 23:11