Understanding the MOVE Command in Windows: Troubleshooting File Movement

  • Thread starter jackson6612
  • Start date
In summary, the "MOVE" command is used to move files between different directories on the same partition. When using the "C:" as the destination, the file will go into the current directory on the C: drive. However, when using "C:\" as the destination, the file will go into the root directory of the C: drive. If the move is done between different partitions, it will actually copy the file and then delete the original. In a DOS/Windows environment with multiple logical disks on an extended partition, moving files between them will involve copying and deleting the original file.
  • #1
jackson6612
334
1
"MOVE" command, C:, C:\

Hi

Please have a look on the video. I have two text files in the drive D: NewFileD and NewFileD2. When I use the Command "move d:\NewFileD2.txt c:", the file is copied but it doesn't appear in the C drive. I don't know where it goes.

But when I use the as "move d:\NewFileD2.txt c:\" with "c:" being followed by a back slash, it appears there. What's the reason for this behavior and where does the file get moved when not using back slash?

Video:

Please help me. Thanks.
 
Last edited by a moderator:
Technology news on Phys.org
  • #2


What's the reason for this behavior and where does the file get moved when not using back slash
C:\ is the address of the root directory of a windows system. "\" means that whatever comes before it is a directory, so "x\" would be the x folder. c: is a file reference, so you may want to look around your d: drive for for a file called c or c:
 
  • #3


Enter the command

dir c:

and it should display the current directory for the c: partition at the start of the listing. To change it to the root directory, enter the command:

cd c:\
 
  • #4


story645 said:
C:\ is the address of the root directory of a windows system. "\" means that whatever comes before it is a directory, so "x\" would be the x folder. c: is a file reference, so you may want to look around your d: drive for for a file called c or c:
Is that it? Or has the file simply been moved to the curdir on the c: drive, whatever that might be?

Been a while since I last did DOS stuff but, IIRC, curdir will be the last directory that you explicitly pointed at on the C: drive before attempting the transfer. Or a default.
 
  • #5


DaveC426913 said:
Is that it? Or has the file simply been moved to the curdir on the c: drive, whatever that might be?
Possible. I honestly got an error when I tried to replicate his code using c:, so I just tried to do it using c and that's what it did.

Just tried again and it worked just the way you said it should.
 
  • #6


c: is a current dir at disk C, c:\ is a root dir at disk C, no doubt about it. It was always this way.
 
  • #7


Thanks a lot, everyone. You all have really helped me. Thank you.

So, did the file go into CURDIR? How do access it? Please let me know.
 
  • #8


Enter

Code:
c:
dir

or

Code:
dir c:
 
  • #9


You can also enter:

cd c:

which will display the current directory for the c partition.

Note that the move command is normally used on the same logical disk, and will just move the file's directory entry from one folder to another folder without actually moving any data. If you use the move command with different partitions, it does a copy followed by a delete.
 
Last edited:
  • #10


rcgldr said:
Note that the move command is normally used on the same partition, and will just move the file's directory entry from one folder to another folder without actually moving any data. If you use the move command with different partitions, it does a copy followed by a delete.

It is not exactly true.

In DOS/Windows environment you may have several logical disks on one extended partition, and moving files between them will mean copying and erasing data.
 
Last edited:
  • #11


Borek said:
In DOS/Windows environment you may have several logical disks on one extended partition, and moving files between them will mean copying and erasing data.
Sorry, I meant logical disk, wasn't considering moving a file between different logical disks on an extended partition. I corrected my previous post.
 

Related to Understanding the MOVE Command in Windows: Troubleshooting File Movement

1. What is the MOVE command in Windows?

The MOVE command in Windows is a command-line tool used to transfer files and folders from one location to another. It is similar to the COPY command, but it also deletes the original files from their original location.

2. How do I use the MOVE command?

To use the MOVE command, open the Command Prompt and type "MOVE" followed by the name of the file or folder you want to move, and then the destination where you want to move it. For example, "MOVE C:\Users\John\Documents\report.docx D:\Archive" will move the file "report.docx" from the "Documents" folder to the "Archive" folder on the D drive.

3. What are some common issues when using the MOVE command?

One common issue when using the MOVE command is accidentally overwriting files in the destination location. Another issue is not having proper permissions to access or move the files. Additionally, using incorrect syntax or not specifying the correct file or folder names can also cause problems.

4. How can I troubleshoot issues with the MOVE command?

If you are having issues with the MOVE command, first check that you are using the correct syntax and specifying the correct file or folder names. Then, make sure you have the necessary permissions to move the files. You can also try using the "DIR" command to see a list of files in the current directory and verify that the file you want to move is present. If all else fails, try using the "XCOPY" command, which is similar to MOVE but does not delete the original files.

5. Can I undo a move using the MOVE command?

No, the MOVE command cannot be undone. Once a file is moved, it is permanently transferred to the new location and deleted from the original location. It is important to double-check your commands and make sure you are moving the correct files before using the MOVE command.

Similar threads

  • Programming and Computer Science
Replies
20
Views
689
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
Replies
4
Views
787
  • Programming and Computer Science
Replies
1
Views
425
  • Programming and Computer Science
Replies
3
Views
557
  • Programming and Computer Science
Replies
14
Views
1K
Replies
6
Views
792
  • Programming and Computer Science
Replies
32
Views
2K
  • Programming and Computer Science
Replies
3
Views
1K
  • Programming and Computer Science
Replies
4
Views
3K
Back
Top