Page 1 of 1
RegEx To Find Path/FileName Length Greater Than 260 Char's
Posted: 28 Sep 2008, 17:33
by knightball
Does anyone have or can write a RegEx for the Find Dialog to search for file names (file name and patch combined length) that is greater than 260 characters.
Posted: 28 Sep 2008, 17:35
by knightball
"patch" should be "path" above.
"(file name and patch combined length)"
Sorry
Posted: 28 Sep 2008, 17:45
by knightball
and to search (a different search) for characters that are illegal in windows vista:
" \ / ? : * " > < |"
Posted: 28 Sep 2008, 19:17
by Ether
Firstly, the Find dialog doesn't utilize regular expressions for name searching, only for content searching.
Secondly, the Find dialog can't search in paths, only names.
knightball wrote:Does anyone have or can write a RegEx for the Find Dialog to search for file names (file name and patch combined length) that is greater than 260 characters.
Assuming that path of more than 260 characters is illegal for Windows (for most of it, anyway) the solution is simple: just search for anything and illegal paths will be logged in the Find Log (Ctrl+L, or click the flashing yellow triangle with an exclamation mark).
knightball wrote:and to search (a different search) for characters that are illegal in windows vista
I'm not sure, because I couldn't create a file with any illegal character but '?', and that doesn't help much. You certainly can't search for '*' and '?', because they will be handled as wildcards. For the rest is Find too smart - an error message pops up.
However, there is a way to hunt them down. Just choose a directory where you want to search and copy/move it. The operation will stop on every illegal name (including names with foreign Unicode characters, unfortunately).