Thx broOld Filenames:
C:\Folder\File1.ext
C:\Folder\File2.ext
C:\Folder\File3.ext
Old Format:
%1
New Format:
%F%1
New Filenames:
C:\Folder\FolderFile1.ext
C:\Folder\FolderFile2.ext
C:\Folder\FolderFile3.ext
Add folder name to rename files
Add folder name to rename files
Didn't find a function to add a folder name to the new file name, for example
Re: Add folder name to rename files
This already works. I just don't know what %F is supposed to be in your example. But here's how you do it, and I just tested it myself.
Old full paths and filenames:
C:\Folder\File1.ext
C:\Folder\File2.ext
C:\Folder\File3.ext
Old format:
C:\Folder\%1.ext
New format:
C:\Folder\SubFolder\%1.ext
New full paths and filenames:
C:\Folder\SubFolder\File1.ext
C:\Folder\SubFolder\File2.ext
C:\Folder\SubFolder\File3.ext
Everything will create the new SubFolder and move the files into it.
Edit: Oh, I see what you were asking for in your example, and here's how you achieve that output as well.
Old format:
C:\%1\%2.ext
New format:
C:\%1\%1%2.ext
The key here is that you get to define your %1, %2 verbs in the "Old format" so you can utilize them within the "New format." You just neglected to define them properly.
Old full paths and filenames:
C:\Folder\File1.ext
C:\Folder\File2.ext
C:\Folder\File3.ext
Old format:
C:\Folder\%1.ext
New format:
C:\Folder\SubFolder\%1.ext
New full paths and filenames:
C:\Folder\SubFolder\File1.ext
C:\Folder\SubFolder\File2.ext
C:\Folder\SubFolder\File3.ext
Everything will create the new SubFolder and move the files into it.
Edit: Oh, I see what you were asking for in your example, and here's how you achieve that output as well.
Old format:
C:\%1\%2.ext
New format:
C:\%1\%1%2.ext
The key here is that you get to define your %1, %2 verbs in the "Old format" so you can utilize them within the "New format." You just neglected to define them properly.
Last edited by raccoon on Mon Jan 25, 2021 9:22 pm, edited 2 times in total.
Re: Add folder name to rename files
If you're working with extra tricky files and folders from multiple locations, here's a practical example people might find useful.
Task: Move all video subtitles into a folder named "Subs".
Old format:
M:\%1\%2.srt
New format:
M:\%1\Subs\%2.srt
Just make sure that none of the selected files for renaming already exist in a \Subs subfolder, or they'll be placed in a \Subs\Subs folder.
Similarly, you can move them out of the Subs subfolder into their parent folder.
Old format:
M:\%1\Subs\%2.srt
New format:
M:\%1\%2.srt
Task: Move all video subtitles into a folder named "Subs".
Old format:
M:\%1\%2.srt
New format:
M:\%1\Subs\%2.srt
Just make sure that none of the selected files for renaming already exist in a \Subs subfolder, or they'll be placed in a \Subs\Subs folder.
Similarly, you can move them out of the Subs subfolder into their parent folder.
Old format:
M:\%1\Subs\%2.srt
New format:
M:\%1\%2.srt
Re: Add folder name to rename files
You can do that already in the current version of Everything.
You are using the rename routine. That will only affect the name and does not include the path of fiules.
Instead, use Advanced Move to Folder... ( under menu:Edit > Advanced)
Method 1: Use functions
When you click on the little triangles at the right, you will see functions you can use to create this:
(sorry; random files, not very clear) For copy paste:
Method 2: Use regular expressions (regex)
This is a little less straightforward, especially if you are not familiar with regex ...
Click on the triangles to learn more about this syntax.
For copy paste:
You are using the rename routine. That will only affect the name and does not include the path of fiules.
Instead, use Advanced Move to Folder... ( under menu:Edit > Advanced)
Method 1: Use functions
When you click on the little triangles at the right, you will see functions you can use to create this:
(sorry; random files, not very clear) For copy paste:
Code: Select all
%1
$pathpart(%1)\$strippath($pathpart(%1))$strippath(%1)
This is a little less straightforward, especially if you are not familiar with regex ...
Click on the triangles to learn more about this syntax.
For copy paste:
Code: Select all
^(.*)\\([^\\]*)\\([^\\]*)$
\1\\\2\\\2\3