Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
8.3 filename
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Working with short filenames in a command prompt== Sometimes it may be desirable to convert a long filename to a short filename, for example when working with the command prompt. A few simple rules can be followed to attain the correct 8.3 filename. # A SFN filename can have at most 8 characters before the dot. If it has more than that, the first 6 must be written, then a tilde {{code|~}} as the seventh character and a number (usually 1) as the eighth. The number distinguishes it from other files with both the same first six letters and the same extension. # Dots are important and must be used even for folder names (if there is a dot in the folder name). If there are multiple dots in the long file/directory name, only the last one is used. The preceding dots should be ignored. If there are more characters than three after the final dot, only the first three are used. # Generally: #*Any spaces in the filenames should be ignored when converting to SFN. #*Ignore all periods except the last one. Do not include any other periods, just like the spaces. Use the last period if any, and the next characters (up to 3). For instance, for .manifest, .man only would be used. #* Commas, square brackets, semicolons, = signs and + signs are changed to underscores. #* Case is not important; upper case and lower case characters are treated equally. To find out for sure the SFN or 8.3 names of the files in a directory use: {{code|lang=dosbatch|dir /x}} shows the short names if there is one, and the long names. or: {{code|lang=dosbatch|dir /-n}} shows only the short names, in the original DIR listing format. In [[Windows NT]]-based operating systems, the command prompt applet ([[cmd.exe]]) accepts long filenames with [[wildcard character]]s (question mark {{code|?}} and asterisk {{code|*}}); long filenames with spaces in them need to be escaped (i.e. enclosed in single or double quotes).<ref>{{cite web |title=Using Long File Names | date=11 September 2008 |url=https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-2000-server/cc976806(v=technet.10)}}</ref> Starting with [[Windows Vista]], console commands and [[PowerShell]] applets perform limited [[pattern matching]] by allowing wildcards in filename and each [[subdirectory]] in the [[file path]] and silently substituting the first matching directory entry (for example, {{code|lang=doscon|C:\>CD \prog*\inter*}} will change the current directory to {{code|C:\Program Files\Internet Explorer\}}).
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)