Solved Move files in command prompt

October 1, 2013 at 18:21:01
Specs: Windows XP
I'm trying to move a file to the current subdirectory. So if my prompt is:

C:\test1\prob1\school>

I'm trying to move a txt file into the school subdirectory.


See More: Move files in command prompt

Report •

#1
October 1, 2013 at 18:47:02
use the copy command and use that as you have it as the destination without the >

google dos copy, xcopy and move commands.


Report •

#2
October 1, 2013 at 19:43:30
✔ Best Answer
copy path to file\file name and enter.

So for example if the file is named abcd.txt and is located on the D: dirve in a sub folder named SUB1 and that subfolder is another subfolder named SUB2 and that is in a folder named SUB on the root directory then:

copy d:\sub\sub2\sub1\abcd.txt

and enter will copy that file to the current directory showing in the prompt.

If the file has more than 8 characters in its name--for example say it's named abcdefghij.txt--then it's easiest to enclose the everything in quotes as dos/command prompt commands use 8.3 file format--8 character for the file name and 3 for the extension. So in that case you'd type in:

copy "d:\sub\sub2\sub1\abcdefghij.txt"

and enter.


Report •

#3
October 1, 2013 at 23:02:17
"If the file has more than 8 characters in its name--for example say it's named abcdefghij.txt--then it's easiest to enclose the everything in quotes as dos/command prompt commands use 8.3 file format--8 character for the file name and 3 for the extension."

No. The command line processor is quite happy with long file names. You only need quotes if the name contains a space.


Report •

Related Solutions

#4
October 2, 2013 at 00:24:02
Oh yeah, that's right. I'm so used to long file names having spaces it's almost always inevitable I use quotes. Of course the ~1 works with spaces but that gets confusing with similar file names and I've never figured out how to use it when the file name has periods in it (besides the one separating the name from the extension). Easier to just use quotes.

Report •

Ask Question