
So my question is - Is there a built in function in the. List invalidFolderCharacters = Path.GetInvalidFileNameChars()įoreach (string s in invalidFolderCharacters)Īs you can see, I'm having to add to the characters returned by GetInvalidFileNameChars() each time a new error pops up. It would be fine if the error message actually told me the range of characters that cannot be included in folder names but it doesn't, so whenever I do a replace on the character I get a new one pop up in the error message, this is what I'm doing to clean the folder name at the moment: private static void CleanPath(StringBuilder path) You should rename this file or directory. cannot be compressed because it includes characters that cannot be used in a compressed folder, such as. However, when it comes to zipping these folders up using the built in zip function in windows (right click > send to > compressed zip folder) I keep getting errors: What I then do is iterate over these folder names and create a new folder using the name, this all works fine, I'm running the names through a loop using Path.GetInvalidFileNameChars to get rid of any characters that would prevent the folder creation from failing.
#COMPRESSED ZIP FOLDER ERROR WINDOWS 10 PC#
Download PC Repair Tool to quickly find & fix Windows errors automatically.

#COMPRESSED ZIP FOLDER ERROR WINDOWS 10 WINDOWS 10#
Going from parent all the way down to child and then child ID. Compressed (Zipped) folders error in Windows 10 File not found or No Read permission. I'm calling a database and pulling in around ~3000 records which are child nodes of parent documents, with these child nodes I'm working back up the tree to generate a flat folder name which looks something like this:Įntertainment Categories ~ Artistic Entertainment ~ Calligraphy Artists ~ Megumi - Japanese Calligraphy Artist Sussex ~ 6546
