0

I need an example of a file with full list of all allowed characters in file name, for testing of command line tool.

Something like:

abc@#$%^&012346789.....

Upd

For Windows 2000-...

With examples for testing of batch parameters escaping, like %1 and such things.

  • Have a look at this link: stackoverflow.com/a/4814088/1859675 It might be useful. – masood ghz Aug 19 '15 at 14:43
  • This is a rules for file naming. I need the long file name example – Y.N Aug 19 '15 at 14:47
  • So which do you want: the full list of all allowed characters or a long file name? – user246 Aug 19 '15 at 15:15
  • Example of file name with whole list – Y.N Aug 19 '15 at 17:49
  • Which file system are we talking about here? – Joe Strazzere Aug 20 '15 at 12:34
2

This is unanswerable, since I think you need a blacklist instead of a white list. Think about non English languages and how many characters that you would need to be on your whitelist.

I am wondering if you really need to test with a filename with all permutations. I think that the code saving the file needs to catch when the file cannot be saved and return a clear message. Now you only have just two cases:

  1. Use a valid filename and save it, verify the file is on disk.
  2. Use an invalid filename and verify you get the message.

The operating system should handle the saving and figure out if the name is valid or not. Also non allowed characters are operating system depended, you might need multiple lists.

Have a look at these questions:

If you really want to use a filename this is the one I tend to use it looks something like this:

ThisIsAVeryLongFilename abc...xzy1234567890!@నేనుÆды.test.ext

I take multiple characters from different languages (atleast Asian, Europian and Russian) from this UTF-8 test page: http://www.columbia.edu/~kermit/utf8.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.