Discussion Locked
0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
How can I copy files have long name like " Prgram files " on DOS command .
5 replies
by jcannon1
I take it you are trying to do this from a command prompt in Windows, ?, and you are trying to do this in something like a BAT program.
This can be done a few ways. One is to use quotes around the name of the file.
eg. copy "a long file name.txt" temp.txt
Or to use the shorten file name, the one with the tilde (~).
eg. copy alongf~1.txt temp.txt
Notice in the second example, there is no space and that the name of the file is the first 6 characters, minus the space, of the file followed by the extention.
Hope this helps.
by eyad
Poster rated this answer
for the file name, take the first 6 letters of it and add an ~1 then add the filenames extension. For example. IF you wanted to copy Windows 95.txt you would type window~1.txt.
by eyad
Poster rated this answer
by eyad
This question was closed by the author
This discussion is closed to new replies.
Trending Windows Forum posts
Sort by Trending
0 helpful
11 replies
0 helpful
10 replies
Question Locked
Do You Save Useful Windows Tutorial Videos for Later
0 helpful
7 replies
0 helpful
1 reply
Question Unanswered
Is WSL still relevant in 2026?
0 helpful
0 replies