Discussion:
moving VS copy and delete
(too old to reply)
Tom Del Rosso
2024-07-14 00:31:27 UTC
Permalink
I want to move some files and folders, from one parent folder to
another, on the same drive.

I know a few methods, but not sure if any method operates by just
changing directory entries instead of copy and delete.

It would avoid fragmentation and is faster.

Thanks.
--
Defund the Thought Police
R.Wieser
2024-07-14 06:42:32 UTC
Permalink
Tom,
I want to move some files and folders, from one parent folder to another,
on the same drive.
I know a few methods, but not sure if any method operates by just changing
directory entries instead of copy and delete.
You're looking for the "move" command.

Though even on my old version of Windows that command will switch to a
copy-and-delete method when the move is done between different drives.

(also, your question has got nothing to do with batch programming)

Regards,
Rudy Wieser
JJ
2024-07-14 07:35:55 UTC
Permalink
Post by Tom Del Rosso
I want to move some files and folders, from one parent folder to
another, on the same drive.
I know a few methods, but not sure if any method operates by just
changing directory entries instead of copy and delete.
It would avoid fragmentation and is faster.
Thanks.
When both the source and target are physically in the same drive, moving
file/folder to the same drive will not move the file's/folder's data. The
move operation will simply move the file's/folder's entry within its parent
folder's data. By "entry", I meant the file information within its
containing folder, such as name, size, attributes, NTFS permissions, etc.

Keep in mind that, the above will not apply when the source or the target is
within a Symbolic Link or Directory Junction which points to a different
drive, because their contents are physically in a different drive.
Tom Del Rosso
2024-07-26 15:36:37 UTC
Permalink
Post by JJ
Post by Tom Del Rosso
I want to move some files and folders, from one parent folder to
another, on the same drive.
I know a few methods, but not sure if any method operates by just
changing directory entries instead of copy and delete.
It would avoid fragmentation and is faster.
Thanks.
When both the source and target are physically in the same drive,
moving file/folder to the same drive will not move the
file's/folder's data. The move operation will simply move the
file's/folder's entry within its parent folder's data. By "entry", I
meant the file information within its containing folder, such as
name, size, attributes, NTFS permissions, etc.
Yeah, I know, but does it apply to commands other than MOVE, like the
move function of Robocopy etc.

I should have emphasized the "and folders" part.

I avoided using MOVE because it doesn't move folders named by wildcards.
To move multiple folders with the MOVE command I had to use FOR to spit
out a list and run it for each one. So that was the solution but not
ideal.
--
Defund the Thought Police
Loading...