#11 2009-10-04 15:04

From: den4b.com
Registered: 2006-04-06
Posts: 3,284

Re: Renaming Children Folders with Parent Name

alext, your task is different to what has been discussed in this topic. You don't even need to use PascalScript.

All you need to do is replace FIRST occurrence of " - " with a "\". Optionally, you can move all you files to a different folder by inserting something like "C:\New Music Folder\" as a prefix.

P.S. In future, start a new topic!


#12 2010-03-10 16:29

Registered: 2009-02-25
Posts: 6

Re: Renaming Children Folders with Parent Name

well, after a year later, I want to revert back to my original folder structure.

I currently have:

c:\artist - album\[contents]

and want to go back to:


I tried playing around with the script that worked for me before, but to no avail.

any help?

thanks in advance,


#13 2010-03-10 20:14

From: Germany, EU
Registered: 2007-10-23
Posts: 1,149

Re: Renaming Children Folders with Parent Name

As Den4b says, since this an other topic, this should be go to an new thread. Please remember this next.

phreaq wrote:

c:\artist - album\[contents]

- Test this test files first!

- Press Alt+F for Filter-Settings:
* [  ] Add FIles disabled
* [X] Add Folders as Files enabled
* all others disabled

- add your top folder "c:\artist - album\" to the list
'Name' should show "artist - album"

- add an new rule REPLACE
* Find: " - "
* Repl: "\"
(without " "-qoute)

Click on Preview:
The 'New Name' should look like "artist\album"

If you work with test files: click on Rename:
"artist - album" is renamed to "artist"
and ALL files and sub-folders of "artist - album"-folder are now in new sub-folder "album" inside of "artist" top-folder.


Last edited by Stefan (2010-03-10 20:18)

Please see HELP and MANUAL in Wiki for more info.
If ReNamer had helped you, please donate a coin to Denis or buy a Pro license for commercial use. (Lite vs Pro)


#14 2010-03-10 21:03

Registered: 2009-02-25
Posts: 6

Re: Renaming Children Folders with Parent Name

Thanks Stefan,

that did the trick.

I was the OP, so I didn't think my post was out of place....


#15 2012-06-07 20:40

Registered: 2011-07-20
Posts: 4

Re: Renaming Children Folders with Parent Name

Here is my problem
I have a list of tracks that were not properly named when I ripped them to my computer using WMP on Windows 7, but correctly named when using Itunes.  I highlighted all of the tracks, held down Shift and Copy as Path, pasted them into the user input dialog, but now the filename contains the foldername path as well as the correctly named tracks.  When I try to create a rule that renames them using that user input, it renames them to the incorrectly named files.

I suppose I could paste into Notepad, Find and replace all instances of the folder path, copy and paste into user input and use that, but it seems like extra steps.

Is there a script to rename the files using the predetermined list created using the user input dialog?

phreaq wrote:
krtek wrote:

You can try to use this simple PascalScript for that job:

Path, SubFolders : TStringsArray;
Depth : Integer;
  if not WideFileExists(FilePath) then
    WideScanDirForFolders(FilePath, SubFolders ,True, False, False);
    If (Depth>1) and (Length(SubFolders)=0) then
      FileName:=Path[Depth-2]+' - ' + Path[Depth-1];

Script will omit files and will proceed only the deepest folders.

dude, you rock. that does the trick

it's been a while since I used pascal, thanks for your efforts.

Last edited by win7guru (2012-06-07 20:41)


Board footer

Powered by FluxBB