#11 2009-10-04 15:04

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

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!

Offline

#12 2010-03-10 16:29

phreaq
Member
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:

c:\artist\album\[contents]

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

any help?

thanks in advance,

Offline

#13 2010-03-10 20:14

Stefan
Moderator
From: Germany, EU
Registered: 2007-10-23
Posts: 1,161

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:

FROM:
c:\artist - album\[contents]
TO:
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.

HTH?

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


Read the  *WIKI* for HELP + MANUAL + Tips&Tricks.
If ReNamer had helped you, please *DONATE* to Denis or buy a PRO license. (Read *Lite vs Pro*)

Offline

#14 2010-03-10 21:03

phreaq
Member
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....

Offline

#15 2012-06-07 20:40

win7guru
Member
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:

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

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)

Offline

Board footer

Powered by FluxBB