A concise summary can be found on Wikipedia: Legal characters for DOS filenames include the following: Upper case letters A – Z; Numbers 0 ...
The following class, Filename , illustrates the use of lastIndexOf() and substring() to isolate different parts of a file name. Note: The methods in the following ...
Summary: Illegal file/folder names and conventions for the following operating systems: Windows Mac OS 9 Mac OS X Description: ...
Use the ? wildcard for file globbing: ls -d /tmp/???? This will print all files and directories whose filename is 4-char long. As suggested by ...
One way would be with sed: mv 'file' $(echo 'file' | sed -e 's/[^A-Za-z0-9._-]/_/g'). Replace file with your filename, of course. This will replace anything that isn't a ...
The * character serves as a "wild card" for filename expansion in globbing.
The string is a .NET string so you can use .NET methods. In your case: $index = " The string".IndexOf(" "). will return 3, which is the first ...
Consider the following two file names, which both match string :
Try something like this instead; string illegal = "\"M\"\\a/ry/ h**ad:>> a\\/:*?\"| li*tt|le|| la\"mb.?"; string invalid = new string(Path.GetInvalidFileNameChars()) + new ...
Gets an array containing the characters that are not allowed in file names.