Color filter for Directional Codes filename protection
-
Millzey
- Posts: 169
- Joined: 07 Oct 2011 15:10
Color filter for Directional Codes filename protection
I've had trouble with invalid filenames files coming from inside archives, and particular characters even causing system crashes with certain OS updates applied or needed. I also often run into the the directional formatting codes protection every once in awhile which makes me nervous, so I quickly rename the folder before doing any action on it. I'm paranoid about overlooking these folders and running actions on them, even just opening them, so I wanted to make a color filter for anything with the applied "*!*" mask so I would see it instantly when browsing. However everything I tried didnt work, and I also dont know how to replicate one of these names safely to keep trying a matching filter. Will this work with the current filters or is it a special condition considering the asterisk and exclaimation?
Thanks
Thanks
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter for Directional Codes filename protection
So you want to create a color filter that matches folder names with specific chars in it?
You replace "z" with one of these chars that exist in such a folder name
The same for "y" and additionally for all other entries that you add with ";"...
Code: Select all
dir: *z*;*y*
The same for "y" and additionally for all other entries that you add with ";"...
One of my scripts helped you out? Please donate via Paypal
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: Color filter for Directional Codes filename protection
The only problem is that it's tricky - I mean, pasting an invisible character is tricky. If CF supported regexes, all you need would be a \u202e (for the RTL override, for example).
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter for Directional Codes filename protection
But pasting unicode representations as regex "characters" is difficult for 99% of the userbase as well 
Why not write a script that works for his case and renames such folders appropriately? UMC is ready for an open beta test in a few days anyway... xD A simple right click & hold on a folder and execute such a script will be simple as pie^^
Why not write a script that works for his case and renames such folders appropriately? UMC is ready for an open beta test in a few days anyway... xD A simple right click & hold on a folder and execute such a script will be simple as pie^^
One of my scripts helped you out? Please donate via Paypal
-
Millzey
- Posts: 169
- Joined: 07 Oct 2011 15:10
Re: Color filter for Directional Codes filename protection
Low an behold I just ran into another masked dir. It appears to be the \u200E character on this one.
I tried dir:*U+200E* but that didnt work. I tried copy and paste of the folder name from XYP and explorer into the color filter, and removing all almost all of the text except for where I knew the character was at. That didnt work.
I also tried dir:*!* like you suggested, but that didnt recognize the protected mask in the folder name either. Seems maybe an escape for the asterisk might be a solution.
Color filters supporting regexs/UCN sounds like a solution, but if that wouldnt work couldnt just the "dir:" attribute check for the applied "*!*" mask and if that is present in the color filter color the folder?
The whole point is to avoid these dangerous files/folders by alerting the user as soon a possible by the color filters, and rename them quickly. A script is fine but it doesnt help avoid overlooking the existence of one so it doesnt perform some harmful action. Just a *!* in the name is easy to overlook. Am I paranoid and blowing the dangers out of proportion?
I tried dir:*U+200E* but that didnt work. I tried copy and paste of the folder name from XYP and explorer into the color filter, and removing all almost all of the text except for where I knew the character was at. That didnt work.
I also tried dir:*!* like you suggested, but that didnt recognize the protected mask in the folder name either. Seems maybe an escape for the asterisk might be a solution.
Color filters supporting regexs/UCN sounds like a solution, but if that wouldnt work couldnt just the "dir:" attribute check for the applied "*!*" mask and if that is present in the color filter color the folder?
The whole point is to avoid these dangerous files/folders by alerting the user as soon a possible by the color filters, and rename them quickly. A script is fine but it doesnt help avoid overlooking the existence of one so it doesnt perform some harmful action. Just a *!* in the name is easy to overlook. Am I paranoid and blowing the dangers out of proportion?
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter for Directional Codes filename protection
It's not colored but you could use a custom column with a script that checks if the name contains one of the DFCs and fills the column with either "###WARNING###" or nothing. Should be visible enough^^
One of my scripts helped you out? Please donate via Paypal
-
TheQwerty
- Posts: 4373
- Joined: 03 Aug 2007 22:30
Re: Color filter for Directional Codes filename protection
- Open Windows' Character Map (Run dialog > charmap.exe)
- Check Advanced View
- Select Unicode under Character Set.
- Enter 200E in the Go to Unicode field.
This will jump to the Left-To-Right mark character. - Press Select
- Repeat for the other DFCs which the safety belt handles:
- U+200E = "Left-to-Right Mark"
- U+200F = "Right-to-Left Mark"
- U+202A = "Left-to-Right Embedding"
- U+202B = "Right-to-Left Embedding"
- U+202C = "Pop Directional Formatting"
- U+202D = "Left-to-Right Override"
- U+202E = "Right-to-Left Override"
- Once you have selected all desired characters, press Copy.
- In XYplorer create a new Color Filter.
- For the pattern:
- Type:
Code: Select all
"Directional Format Characters" [] - Move the cursor left (so it is within the brackets).
- Paste from the system clipboard (the characters you just copied from Character Map).
The idea is to end up with:Code: Select all
"Directional Format Characters" [<clipboard>]
- Type:
- Configure the colors for the filter.
EDIT: Tip: Use the Tools > Configuration > Color Filters dialog for this - it can be a bit painful attempting to type your colors in the Tools > List Management > Color Filters dialog.
Tip: The "Directional Format Characters" is just a caption to help when looking at your list of filters, and in this case will work much better than using a comment:
Code: Select all
[<clipboard>] //Directional Format CharactersHTH
EDIT: Don, this might be a good addition to the default color filters or ICFs.
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter for Directional Codes filename protection
TheQwerty wrote:Not fullquoting your instructions here^^
One of my scripts helped you out? Please donate via Paypal
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: Color filter for Directional Codes filename protection
The same reasons that prevent us from writing here an easy to copypaste filterTheQwerty wrote:...For reasons that become clear after you paste those characters.
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter for Directional Codes filename protection
I included a dfcs removal script in UMC 
Before:
After:
Before:
Code: Select all
R:\CORP_INVOICE_08.14.2011_Pr.phylexe.doc
R:\Htxt.exe
Code: Select all
R:\CORP_INVOICE_08.14.2011_Pr.phylexe.doc
R:\Htxt.exe
You do not have the required permissions to view the files attached to this post.
One of my scripts helped you out? Please donate via Paypal
-
Millzey
- Posts: 169
- Joined: 07 Oct 2011 15:10
Re: Color filter for Directional Codes filename protection
Thanks for all the help.
What is UMC and can you link me to it?
What is UMC and can you link me to it?
-
highend
- Posts: 14925
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: Color filter for Directional Codes filename protection
UMC = Ultimate Menu Configurator
Open beta test will start (probably) on the next weekend so atm there is no official link yet
Open beta test will start (probably) on the next weekend so atm there is no official link yet
One of my scripts helped you out? Please donate via Paypal
-
Marco
- Posts: 2354
- Joined: 27 Jun 2011 15:20
Re: Color filter for Directional Codes filename protection
Tag Backup - SimpleUpdater - XYplorer Messenger - The Unofficial XYplorer Archive - Everything in XYplorer
Don sees all [cit. from viewtopic.php?p=124094#p124094]
Don sees all [cit. from viewtopic.php?p=124094#p124094]
-
admin
- Site Admin
- Posts: 66093
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: Color filter for Directional Codes filename protection
What about a variable for single characters in this format:
Code: Select all
<U+200E>FAQ | XY News RSS | XY X
-
Millzey
- Posts: 169
- Joined: 07 Oct 2011 15:10
Re: Color filter for Directional Codes filename protection
Works for me thanks for looking into adding the feature.
Since posting I ran into a few other unicodes not on the direction protection list that are invisible and actually present a problem (zero width space, etc), that when copying some or all of the filename string and pasting for searching somewhere else like a website or program yields no results. This feature would be nice to see when those are present also so they can be renamed.
Since posting I ran into a few other unicodes not on the direction protection list that are invisible and actually present a problem (zero width space, etc), that when copying some or all of the filename string and pasting for searching somewhere else like a website or program yields no results. This feature would be nice to see when those are present also so they can be renamed.
XYplorer Beta Club