I have found the special char "&" creates an issue when trying to zip a file in microsoft window 10. So if you have a file within a folder with "&" it won't work.
IMPORTANT: I don't want to screw anything up. I only want to find "&" in file names and folders and replace it with "and" and leave everthing else the same. ex Bill & Jane.txt with Bill and Jane.txt
So what special commands do I need to know??
Reason why I think I might have to do a find and replace?
I usually don't use zip files but having issues with my onedrive no syncing with with onedrive in the cloud?? I don't know but guessing or it may because i have been doing some massive changes with folders that I'm syncing on onedrive from local computer to onedrive in cloud when it's says it's looking for changes but things are not getting done quickly.
I have paused syncing then turned it back on. Still says it is looking for changes and yet a number of folders are not getting synced?
Need to Search and Replace "&" with And in all files in my system
-
- Posts: 20
- Joined: Thu Jan 07, 2021 3:47 pm
Re: Need to Search and Replace "&" with And in all files in my system
I don't know what file manager you are using.
In Total commander I let Everything search for the names containing &
and then using TCs multi-rename function with search and replace.
The same can be done in XYplorer based on an Everything search.
In Total commander I let Everything search for the names containing &
and then using TCs multi-rename function with search and replace.
The same can be done in XYplorer based on an Everything search.
Re: Need to Search and Replace "&" with And in all files in my system
Make sure you exclude any system folders, for example:
!c:\users\*\appdata\** !C:\windows\ !"c:\program files\" !"c:\program files (x86)\" !"c:\programdata\"
Consider using the document filter to limit the renamed files to documents only:
doc:
Search for non-system doc files containing &:
!c:\users\*\appdata\** !C:\windows\ !"c:\program files\" !"c:\program files (x86)\" !"c:\programdata\" doc: &
To rename & to and for all these files with Everything:
Select all the results. (Ctrl + A) (consider only doing a few 100-1000 files at a time)
Press F2.
Make sure regular expressions is checked.
Change the old format to: &
Change the new format to: and
Double check the newly generated filenames are as desired.
Click OK.
Make a backup of your filenames before doing anything from File -> Export.
Undo multiple file renames from Edit -> Undo or Index -> Index Journal (Everything 1.5+) for more control.
!c:\users\*\appdata\** !C:\windows\ !"c:\program files\" !"c:\program files (x86)\" !"c:\programdata\"
Consider using the document filter to limit the renamed files to documents only:
doc:
Search for non-system doc files containing &:
!c:\users\*\appdata\** !C:\windows\ !"c:\program files\" !"c:\program files (x86)\" !"c:\programdata\" doc: &
To rename & to and for all these files with Everything:
Select all the results. (Ctrl + A) (consider only doing a few 100-1000 files at a time)
Press F2.
Make sure regular expressions is checked.
Change the old format to: &
Change the new format to: and
Double check the newly generated filenames are as desired.
Click OK.
Make a backup of your filenames before doing anything from File -> Export.
Undo multiple file renames from Edit -> Undo or Index -> Index Journal (Everything 1.5+) for more control.
Re: Need to Search and Replace "&" with And in all files in my system
I'm not sure how it will help. How to restore?
In severe cases, the user had to export checksum or/and other properties, in order to restore the file structure. (and also then I would ask: how to restore?)
This is not an intuitive way for those unfamiliar with the Index Journal.Undo multiple file renames from Index -> Index Journal (Everything 1.5+)
Where the user will look to solve the problem?
You can add a button for "Index Journal" in Rename dialog.
You can add "Index Journal" entry somewhere in Undo menu.
Re: Need to Search and Replace "&" with And in all files in my system
Don't know that it's intended for "restore", but rather reference of what was done in case something goes awry.I'm not sure how it will help. How to restore?
Index Journal is not an intuitive feature & one that most will never frequent (so in that regard... IMO...).This is not an intuitive way for those unfamiliar with the Index Journal.
Aside from Index Journal, there is Ctrl+Z (undo, & Ctrl+Y, redo).
Re: Need to Search and Replace "&" with And in all files in my system
Yes, the filename backup is just so you have a reference of the original filenames.
Yes, Edit -> Undo will work for multiple file renames.
The Index Journal will give you more control (Undo a single rename).
Yes, Edit -> Undo will work for multiple file renames.
The Index Journal will give you more control (Undo a single rename).
Re: Need to Search and Replace "&" with And in all files in my system
I did this some time ago and found that there were cases where there were no spaces around the &, like some song part one&two
This worked for me (regular expressions enabled)
OLD:\s*&\s*
NEW:
_&_
(replace the _ with a SPACE)