"Keep Particular Characters" - can I run on entire drive?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
marvin_rock
Posts: 9
Joined: 05 Jan 2012 14:31

"Keep Particular Characters" - can I run on entire drive?

Post by marvin_rock »

Title sums it up pretty well, I want to run the "Keep Particular Characters" over an entire drive (a few million files), currently I'm doing a *.* search on each folder, then selecting all files, then doing it that way. Is there a quicker way of doing it?

marvin_rock
Posts: 9
Joined: 05 Jan 2012 14:31

Re: "Keep Particular Characters" - can I run on entire drive

Post by marvin_rock »

Or possibly just run a search that shows me any files that have characters OTHER than "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 _-.()"

admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: "Keep Particular Characters" - can I run on entire drive

Post by admin »

Just a quick shot: Try this search pattern, and ensure that this ticked: Configuration > Find Files & Branch View > Find Files > Enable extended pattern matching

Code: Select all

*[!a-zA-Z0-9 ._()-]*

marvin_rock
Posts: 9
Joined: 05 Jan 2012 14:31

Re: "Keep Particular Characters" - can I run on entire drive

Post by marvin_rock »

admin wrote:Just a quick shot: Try this search pattern, and ensure that this ticked: Configuration > Find Files & Branch View > Find Files > Enable extended pattern matching

Code: Select all

*[!a-zA-Z0-9 ._()-]*
This seems to be working. I couldn't find that setting specifically, but it seems to be doing the trick, can you explain how that search patter works? Also, is there any way to add "&" into the search, I appear to be getting most of my hits from that symbol, which is okay for what I'm trying to do.

admin
Site Admin
Posts: 66300
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: "Keep Particular Characters" - can I run on entire drive

Post by admin »

Code: Select all

*[!a-zA-Z0-9 ._()&-]*
The hyphen (-) should be the last in the list between [ and ].

[...] specifies a list of characters
! at the beginning means NOT
a-z = abcdef...z
A-Z = ABCDEF...Z
* is the usual wildcard

The whole means: Match any string that contains anywhere a char that is not in the list "a-zA-Z0-9 ._()&-".

marvin_rock
Posts: 9
Joined: 05 Jan 2012 14:31

Re: "Keep Particular Characters" - can I run on entire drive

Post by marvin_rock »

Working perfect! Thanks!!!

Marco
Posts: 2354
Joined: 27 Jun 2011 15:20

Re: "Keep Particular Characters" - can I run on entire drive

Post by Marco »

Or, you can try this regex pattern:

Code: Select all

[^\w \-.()]
where

Code: Select all

[  opens the character class
^  negates the content
\w the ASCII characters [A-Za-z0-9_], notice the inclusion of the underscore and digits
   the space
\- the hyphen, escaped
.  the dot
() the parentheses
]  closes the character class
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]

Post Reply