Understanding the MOVE Command in Windows: Troubleshooting File Movement

  • Thread starter Thread starter jackson6612
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around the behavior of the "MOVE" command in Windows, particularly focusing on the differences between using "c:" and "c:\" as destination paths. Participants explore the implications of these commands on file movement and directory structure.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant describes an issue where a file does not appear in the C drive when using "move d:\NewFileD2.txt c:" without a backslash.
  • Another participant explains that "C:\" refers to the root directory, while "c:" may refer to a file reference, suggesting the file might be located elsewhere on the D drive.
  • There is a discussion about the concept of "curdir" (current directory) on the C drive and whether the file was moved there instead of the root directory.
  • One participant mentions receiving an error when trying to replicate the command with "c:" but successfully executed it with "c" instead.
  • Another participant confirms the distinction between "c:" as a current directory and "c:\" as the root directory, asserting that this has always been the case.
  • There is a clarification that the "move" command typically operates within the same logical disk, and moving files between different partitions involves copying and deleting data.
  • A later reply corrects a previous statement about moving files between logical disks, indicating that it was a misunderstanding regarding extended partitions.

Areas of Agreement / Disagreement

Participants express differing views on the behavior of the "MOVE" command, particularly regarding the implications of using "c:" versus "c:\". There is no consensus on the exact mechanics of file movement in this context, and some statements are corrected or refined throughout the discussion.

Contextual Notes

Participants mention the concept of "curdir" and its potential impact on file movement but do not fully resolve how to access files moved to this directory. There are also discussions about the behavior of the "MOVE" command across different logical disks and partitions, which remain nuanced and somewhat unresolved.

jackson6612
Messages
334
Reaction score
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


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:
 


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:\
 


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.
 


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.
 


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.
 


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.
 


Enter

Code:
c:
dir

or

Code:
dir c:
 


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.
 

Similar threads

  • · Replies 20 ·
Replies
20
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
14
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
3
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 32 ·
2
Replies
32
Views
4K
Replies
6
Views
3K