Answer the question
In order to leave comments, you need to log in
How to bulk remove character icons (➨,+,★,♥, etc.) from a filename?
Good afternoon, 2 days I'm looking for a solution to remove symbolic icons from a file name. The solution is sought under Linux or Win (preferably Linux). Graphic or console (preferably console). On the symbol +, the Ubuntu console generally go crazy, as it considers it an input parameter (If you do not add --). I need something that will remove all these
unnecessary
icons rename -v "s/[^0-9a-zA-Z\-\._а-яА-Я]//g" *
.
it throws an error when working with such characters. In general, trouble .. Can anyone suggest what can be done about this?
Answer the question
In order to leave comments, you need to log in
Under WIN, you can do this:
- take the AntRenamer portable
program
- feed files to it, for example, by drag'n'drop
- if it's enough to simply remove all non-alphanumerics from the names, then click the Actions button in the toolbar, select Regular from the list on the left Expressions, fill in the Expression field with something like
* I'm generally zero in regexps, but everything worked fine on the test files. Surely you can write better, but it works like that.
* If you type something in the NEW NAME field, the erased characters will be replaced with this string.
* Below, if the corresponding checkbox is enabled, you can see an example of processing a file selected in the list of files for processing. It is also fashionable to see Preview for all files by returning to the tab with files by clicking on the button of the same name in the toolbar. If necessary, also press the Refresh preview button (page with a magnifying glass).
- Next, press the GO button in the toolbar and enjoy the result.
I somehow solved a similar problem and ran into a problem that after renaming conflicts can occur when the names of different files after deleting some characters can match. In this case, I made a table of original file names in excel, renamed them to the next column and checked that there were no duplicates (if there were, it was possible to write directly in excel what the new name should be). When I achieved the desired result with no duplicates, then based on the tables I made a BAT file for renaming files by name. This approach ensures that there will be no duplicates and all files will be with exactly the specified names and there is no need to duplicate the directory with the files (or archive), because. the size of such directories can be gigantic both in terms of the number and volume of files.
I think that you should not immediately rename the files in the directory / directories directly, but check that there will be no duplicates after renaming. Regular games, of course, will do, but the result must be analyzed in advance.
Try the solution from here serverfault.com/questions/348482/how-to-remove-inv...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question