One rootfolder with -many- subfolders.
Files are sorted by path length.
Quite a number exceed the max of 255 characters.
Now, I would like to find and replace text in the path so as to shorten it. Some texts are double, or simply not necessary.
Any suggestions?
Thanks!
Long file names - how to replace text in path
Re: Long file names - how to replace text in path
Depending on what you've got, & just what you want to get to, these might help:
Rename - Randomize Function
Copy Tree structure objects from result List
Merge Directory Structures
Rename - Randomize Function
Copy Tree structure objects from result List
Merge Directory Structures
Re: Long file names - how to replace text in path
To search for files/folders with a path that exceeds 259 characters, include the following in your search:
path:len:>259
259 is the maximum number of characters the Windows Shell can handle.
Advanced rename can batch rename these files/folders with long filenames.
To advanced rename files/folders:
Advanced move can batch move these files/folders with long paths.
To advanced move files/folders:
path:len:>259
259 is the maximum number of characters the Windows Shell can handle.
Advanced rename can batch rename these files/folders with long filenames.
To advanced rename files/folders:
- Select the long filenames in Everything.
- Press F2.
- Uncheck regular expressions.
- Set the old format to the find text.
- Set the new format to the replacement text.
- Review the newly generated filenames.
- Click OK.
Advanced move can batch move these files/folders with long paths.
To advanced move files/folders:
- Select the long filenames in Everything.
- From the Edit menu, under the Advanced submenu, click Advanced move to folder.
- Check regular expressions.
- Set the old format, for example: ^(.*)\\[^\\]*\\([^\\]*)$
- Set the new format, for example: $1:\\$2:
(this will remove the last path part) - Review the newly generated filenames.
- Click OK.
Re: Long file names - how to replace text in path
Thanks for the above.
Whilst Everything is set to its default filter, then I am afraid I can't get Everything to rename the folder names, i.e. renaming (F2) will apply on the file names.
Of course I could set the filter to "Folder" and sort on path length. However, in that case the files within those folders are excluded in the path length.
For example, when Filter is to Folder:
a path length of the folder may show up as 240 - excluding the file name in that folder (e.g. 20 characters), so the actual total path length is 260.
I believe there is a column named "Maximum Component Length". I think it is limited to 255 charactersL it will include the file name length upto 255 characters. Likely this is hardcoded: vainly searched for settings and in the .ini to increase this number to, let's say, 300.
See below:
Whilst Everything is set to its default filter, then I am afraid I can't get Everything to rename the folder names, i.e. renaming (F2) will apply on the file names.
Of course I could set the filter to "Folder" and sort on path length. However, in that case the files within those folders are excluded in the path length.
For example, when Filter is to Folder:
a path length of the folder may show up as 240 - excluding the file name in that folder (e.g. 20 characters), so the actual total path length is 260.
I believe there is a column named "Maximum Component Length". I think it is limited to 255 charactersL it will include the file name length upto 255 characters. Likely this is hardcoded: vainly searched for settings and in the .ini to increase this number to, let's say, 300.
See below:
Re: Long file names - how to replace text in path
Please try the following:
Change your search to:
file:path:len:>259
This will show all files that have a really long full path and name.
Select all these files and press Ctrl + Shift + C
This will copy the filenames to your clipboard.
Change the search to:
childfilelist1:
Hold down Ctrl and click the childfilelist1: text in the search box.
Paste your filenames and click OK.
Everything will now list folders that contain a file with a really long filename (> 259 characters)
You can rename the folders from there..
childfilelist1:
Advanced Rename
The maximum component length is for the name part.
The name part (without the path part) cannot exceed 255 characters.
Change your search to:
file:path:len:>259
This will show all files that have a really long full path and name.
Select all these files and press Ctrl + Shift + C
This will copy the filenames to your clipboard.
Change the search to:
childfilelist1:
Hold down Ctrl and click the childfilelist1: text in the search box.
Paste your filenames and click OK.
Everything will now list folders that contain a file with a really long filename (> 259 characters)
You can rename the folders from there..
childfilelist1:
Advanced Rename
The maximum component length is for the name part.
The name part (without the path part) cannot exceed 255 characters.
Re: Long file names - how to replace text in path
As always: thanks a lot!
Normally I wouldn't go beyond -say- 240-245 characters (total path length)
In this specific case, these were saved/exported mail attachments, including include 'Domain', 'From' and 'To' and 'Subject' of the email in the path.
So I would know what the file was/is about, as well as sender name.
However, all this resulted in total path lengths if 300 characters and it should be addressed: cut down to 240.
This being the background of my question.
Anyway, thanks again.
Normally I wouldn't go beyond -say- 240-245 characters (total path length)
In this specific case, these were saved/exported mail attachments, including include 'Domain', 'From' and 'To' and 'Subject' of the email in the path.
So I would know what the file was/is about, as well as sender name.
However, all this resulted in total path lengths if 300 characters and it should be addressed: cut down to 240.
This being the background of my question.
Anyway, thanks again.