One of the limitations of my FTP code is that it considers the space character to be a delimiter when parsing command line input. This is certainly true for DOS filenames, but a space might be a legal character on another OS like Unix.
I want to add the ability to handle filenames with spaces in them. There are two primary ways to do this:
Which method do you prefer? Have any other ideas?
I'm also looking to support filenames with characters that are not in the standard ASCII 32 to 126 range to make my European friends happier. I think I can do that easily by just being less restrictive while I accept keyboard input. (DOS should be able to handle filenames with the first character being 0xE5 safely. I'll only have a problem with 0xE5 if running on a DOS version earlier than 3.0.)
I want to add the ability to handle filenames with spaces in them. There are two primary ways to do this:
- Use quotes around strings with embedded spaces that are to be treated as a single parameter: This is natural, but the quote character is a legal DOS filename character. So a leading quote might not be a special character, but an actual part of a filename.
- Use an 'escape' character like the backslash to escape special characters: I would only need two escape sequences to do this, a '\\' to mean a single slash and a '\ ' to mean a space. But typing filenames with spaces this way is awkward. And the backslash is the DOS path delimiter so there might be cases where a \\ is required where none is required now.
Which method do you prefer? Have any other ideas?
I'm also looking to support filenames with characters that are not in the standard ASCII 32 to 126 range to make my European friends happier. I think I can do that easily by just being less restrictive while I accept keyboard input. (DOS should be able to handle filenames with the first character being 0xE5 safely. I'll only have a problem with 0xE5 if running on a DOS version earlier than 3.0.)