Which characters are invalid for MS-DOS filenames?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I'm writing a filename i/o procedure in x86-16 assembly language. It takes 8 characters (I don't need to support long filenames) from the keyboard and prints them to the screen into a text input field.
At the moment, i'm allowing numbers, upper/lower case letters, underscore, and hyphens. I'd like to allow all symbols that won't cause issues with MS-DOS. I couldn't find an official list of banned characters, except that '.' shouldn't be a leading character. Common sense tells me that slashes are illegal, but '+' should be okay, but I don't know for sure.
I'm already ignoring '.' because ".REG" is automatically appended to the end of the file name before control is passed to MS-DOS file services.
filenames ms-dos
New contributor
add a comment |Â
up vote
1
down vote
favorite
I'm writing a filename i/o procedure in x86-16 assembly language. It takes 8 characters (I don't need to support long filenames) from the keyboard and prints them to the screen into a text input field.
At the moment, i'm allowing numbers, upper/lower case letters, underscore, and hyphens. I'd like to allow all symbols that won't cause issues with MS-DOS. I couldn't find an official list of banned characters, except that '.' shouldn't be a leading character. Common sense tells me that slashes are illegal, but '+' should be okay, but I don't know for sure.
I'm already ignoring '.' because ".REG" is automatically appended to the end of the file name before control is passed to MS-DOS file services.
filenames ms-dos
New contributor
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm writing a filename i/o procedure in x86-16 assembly language. It takes 8 characters (I don't need to support long filenames) from the keyboard and prints them to the screen into a text input field.
At the moment, i'm allowing numbers, upper/lower case letters, underscore, and hyphens. I'd like to allow all symbols that won't cause issues with MS-DOS. I couldn't find an official list of banned characters, except that '.' shouldn't be a leading character. Common sense tells me that slashes are illegal, but '+' should be okay, but I don't know for sure.
I'm already ignoring '.' because ".REG" is automatically appended to the end of the file name before control is passed to MS-DOS file services.
filenames ms-dos
New contributor
I'm writing a filename i/o procedure in x86-16 assembly language. It takes 8 characters (I don't need to support long filenames) from the keyboard and prints them to the screen into a text input field.
At the moment, i'm allowing numbers, upper/lower case letters, underscore, and hyphens. I'd like to allow all symbols that won't cause issues with MS-DOS. I couldn't find an official list of banned characters, except that '.' shouldn't be a leading character. Common sense tells me that slashes are illegal, but '+' should be okay, but I don't know for sure.
I'm already ignoring '.' because ".REG" is automatically appended to the end of the file name before control is passed to MS-DOS file services.
filenames ms-dos
filenames ms-dos
New contributor
New contributor
New contributor
asked 1 hour ago
My life is a bug.
1185
1185
New contributor
New contributor
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
4
down vote
accepted
According to wikipedia
Legal characters for DOS filenames include the following:
- Upper case letters
A
âÂÂZ
- Numbers
0
âÂÂ9
- Space (though trailing spaces in either the base name or the extension are considered to be padding and not a part of the filename, also filenames with spaces in them must be enclosed in quotes to be used on a DOS command line, and if the DOS command is built programatically, the filename must be enclosed in quadruple quotes when viewed as a variable within the program building the DOS command.)
! # $ % & ' ( ) - @ ^ _ ` ~
- Values 128âÂÂ255 (though if NLS services are active in DOS, some characters interpreted as lowercase are invalid and unavailable)
This excludes the following ASCII characters:
" * + , / : ; < = > ? [ ] |
[9]
- Windows/MS-DOS has no shell escape character
.
(U+002E . full stop) within name and extension fields, except in . and .. entries (see below)
- Lower case letters
a
âÂÂz
(stored as AâÂÂZ on FAT12/FAT16)
- Control characters 0âÂÂ31
- Value 127 (DEL)[dubious â discuss]
https://en.wikipedia.org/wiki/8.3_filename#Directory_table
add a comment |Â
up vote
1
down vote
Found this in a manual for MS-DOS 3.3, i'm running 6.22, but it probably still applies.
I was wrong about '+' being allowed.
New contributor
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
accepted
According to wikipedia
Legal characters for DOS filenames include the following:
- Upper case letters
A
âÂÂZ
- Numbers
0
âÂÂ9
- Space (though trailing spaces in either the base name or the extension are considered to be padding and not a part of the filename, also filenames with spaces in them must be enclosed in quotes to be used on a DOS command line, and if the DOS command is built programatically, the filename must be enclosed in quadruple quotes when viewed as a variable within the program building the DOS command.)
! # $ % & ' ( ) - @ ^ _ ` ~
- Values 128âÂÂ255 (though if NLS services are active in DOS, some characters interpreted as lowercase are invalid and unavailable)
This excludes the following ASCII characters:
" * + , / : ; < = > ? [ ] |
[9]
- Windows/MS-DOS has no shell escape character
.
(U+002E . full stop) within name and extension fields, except in . and .. entries (see below)
- Lower case letters
a
âÂÂz
(stored as AâÂÂZ on FAT12/FAT16)
- Control characters 0âÂÂ31
- Value 127 (DEL)[dubious â discuss]
https://en.wikipedia.org/wiki/8.3_filename#Directory_table
add a comment |Â
up vote
4
down vote
accepted
According to wikipedia
Legal characters for DOS filenames include the following:
- Upper case letters
A
âÂÂZ
- Numbers
0
âÂÂ9
- Space (though trailing spaces in either the base name or the extension are considered to be padding and not a part of the filename, also filenames with spaces in them must be enclosed in quotes to be used on a DOS command line, and if the DOS command is built programatically, the filename must be enclosed in quadruple quotes when viewed as a variable within the program building the DOS command.)
! # $ % & ' ( ) - @ ^ _ ` ~
- Values 128âÂÂ255 (though if NLS services are active in DOS, some characters interpreted as lowercase are invalid and unavailable)
This excludes the following ASCII characters:
" * + , / : ; < = > ? [ ] |
[9]
- Windows/MS-DOS has no shell escape character
.
(U+002E . full stop) within name and extension fields, except in . and .. entries (see below)
- Lower case letters
a
âÂÂz
(stored as AâÂÂZ on FAT12/FAT16)
- Control characters 0âÂÂ31
- Value 127 (DEL)[dubious â discuss]
https://en.wikipedia.org/wiki/8.3_filename#Directory_table
add a comment |Â
up vote
4
down vote
accepted
up vote
4
down vote
accepted
According to wikipedia
Legal characters for DOS filenames include the following:
- Upper case letters
A
âÂÂZ
- Numbers
0
âÂÂ9
- Space (though trailing spaces in either the base name or the extension are considered to be padding and not a part of the filename, also filenames with spaces in them must be enclosed in quotes to be used on a DOS command line, and if the DOS command is built programatically, the filename must be enclosed in quadruple quotes when viewed as a variable within the program building the DOS command.)
! # $ % & ' ( ) - @ ^ _ ` ~
- Values 128âÂÂ255 (though if NLS services are active in DOS, some characters interpreted as lowercase are invalid and unavailable)
This excludes the following ASCII characters:
" * + , / : ; < = > ? [ ] |
[9]
- Windows/MS-DOS has no shell escape character
.
(U+002E . full stop) within name and extension fields, except in . and .. entries (see below)
- Lower case letters
a
âÂÂz
(stored as AâÂÂZ on FAT12/FAT16)
- Control characters 0âÂÂ31
- Value 127 (DEL)[dubious â discuss]
https://en.wikipedia.org/wiki/8.3_filename#Directory_table
According to wikipedia
Legal characters for DOS filenames include the following:
- Upper case letters
A
âÂÂZ
- Numbers
0
âÂÂ9
- Space (though trailing spaces in either the base name or the extension are considered to be padding and not a part of the filename, also filenames with spaces in them must be enclosed in quotes to be used on a DOS command line, and if the DOS command is built programatically, the filename must be enclosed in quadruple quotes when viewed as a variable within the program building the DOS command.)
! # $ % & ' ( ) - @ ^ _ ` ~
- Values 128âÂÂ255 (though if NLS services are active in DOS, some characters interpreted as lowercase are invalid and unavailable)
This excludes the following ASCII characters:
" * + , / : ; < = > ? [ ] |
[9]
- Windows/MS-DOS has no shell escape character
.
(U+002E . full stop) within name and extension fields, except in . and .. entries (see below)
- Lower case letters
a
âÂÂz
(stored as AâÂÂZ on FAT12/FAT16)
- Control characters 0âÂÂ31
- Value 127 (DEL)[dubious â discuss]
https://en.wikipedia.org/wiki/8.3_filename#Directory_table
answered 39 mins ago
phuclv
8,01643385
8,01643385
add a comment |Â
add a comment |Â
up vote
1
down vote
Found this in a manual for MS-DOS 3.3, i'm running 6.22, but it probably still applies.
I was wrong about '+' being allowed.
New contributor
add a comment |Â
up vote
1
down vote
Found this in a manual for MS-DOS 3.3, i'm running 6.22, but it probably still applies.
I was wrong about '+' being allowed.
New contributor
add a comment |Â
up vote
1
down vote
up vote
1
down vote
Found this in a manual for MS-DOS 3.3, i'm running 6.22, but it probably still applies.
I was wrong about '+' being allowed.
New contributor
Found this in a manual for MS-DOS 3.3, i'm running 6.22, but it probably still applies.
I was wrong about '+' being allowed.
New contributor
New contributor
answered 59 mins ago
My life is a bug.
1185
1185
New contributor
New contributor
add a comment |Â
add a comment |Â
My life is a bug. is a new contributor. Be nice, and check out our Code of Conduct.
My life is a bug. is a new contributor. Be nice, and check out our Code of Conduct.
My life is a bug. is a new contributor. Be nice, and check out our Code of Conduct.
My life is a bug. is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f1362080%2fwhich-characters-are-invalid-for-ms-dos-filenames%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password