1.

Solve : Moving a file in dos?

Answer»

Can someone help me out on this I know I missing something. I WANT to move a file "l.jpg" on my DESKTOP to a folder "TEST" on my desktop. this is the output of my request.

C:\Documents and Settings\dlam\Desktop>copy l.jpg \TEST
Overwrite \TEST? (Yes/No/All): y
1 file(s) copied.

The problem is that even THOUGH it said it copied the file to the TEST directory no file was actually copied to it. bizzare, EH? Any suggestions would be greatly appreciated. it will have copied the file to the directory TEST under the root of the drive, use this
Code: [Select]copy l.jpg TEST

and do you want to copy or move ?The command is:
Code: [Select]move (source file) (destination file)Example:
Code: [Select]move C:\Documents\Picture.jpg C:\Temp\Picture.jpg
Try that...It might be better to write out the fully qualified names of the source and destination directories. This should reduce chances for error.

Code: [Select]copy "C:\Documents and Settings\dlam\Desktop\l.jpg" "C:\Documents and Settings\dlam\Desktop\Test"

Your code uses relative paths and forces the user to be signed on to his/her desktop folder. The fully qualified names (above) eliminates that requirement.



Your post is ambiguous. You mention to move the file but your sample code shows copy.

PS. Your code would have WORKED had you left out the leading SLASH before TEST.



Discussion

No Comment Found