Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Server Security > Re: File move within NTFS partition

Reply
Thread Tools Display Modes

Re: File move within NTFS partition

 
 
Al Dunbar
Guest
Posts: n/a

 
      03-02-2009

"Ken" <> wrote in message
news:bee70105-7d9c-4183-80fd-...
> Do file contents get read and copied to a new location on disk due to
> a file move opertion "to a subfolder within the same NFTS partition"
> or does it update a pointer in some NTFS table to point that the file
> now resides in a different folder?
> I am hoping that my app will cause negligible IO when it moves file
> from an Unprocessed to a Processed folder after the file gets
> processed.


Not really a security issue, but...

The answer to your question is: it depends.

As I understand it, a move operation, whether scripted, done from a command
prompt, or via drag-and-drop or cut-and-paste from windows explorer will
simply update the source and destination directories, but that the content
of the file remains where it was. In effect, a move between folders on the
same volume is much like a rename in a single folder. But this will ONLY be
the case when the path to the source and destination folders as specified
have a common root.

For example, if you move a file from D:\here\ to D:\there\, the only changes
are to those two folders themselves. But if D:\there\ was shared out as
\\computer\thereshare, and the copy was done from D:\here\ to
\\computer\thereshare\, the entity actually carrying out the copy would not
necessarily be able to do the same, as it would assume two separate volumes.
In that case the move would involve a copy and a delete.

/Al



 
Reply With Quote
 
 
 
 
Al Dunbar
Guest
Posts: n/a

 
      03-04-2009

"Ken" <> wrote in message
news:4b302229-1dce-4ac2-9bec-...
> Al, from your post I understand that a file move from \\Computter
> \hereshare to \\Computer\thereshare will not cause a copy and delete,
> but a move between d:\here to \\Computer\thereshare will cause a
> physical copy and delete. Is that right?


No. As I understand it, both moves would cause a copy and delete. The
computer from which the move is being done has no way to know whether or not
the two shares "hereshare" and "thereshare" are on the same volume. As I
said, the source and destination folders must have a common root, but
perhaps I should have defined that a little better, i.e.:

The root folder on a drive (mapped or otherwise) is "{driveletter}:\" or,
"C:\". For a UNC, it includes the sharename: "\\server\share".

/Al


 
Reply With Quote
 
Al Dunbar
Guest
Posts: n/a

 
      03-05-2009

"Michael D. Ober" <obermd.@.alum.mit.edu.nospam.> wrote in message
news:JLCdnW0-...
> "Al Dunbar" <> wrote in message
> news:%...
>>
>> "Ken" <> wrote in message
>> news:4b302229-1dce-4ac2-9bec-...
>>> Al, from your post I understand that a file move from \\Computter
>>> \hereshare to \\Computer\thereshare will not cause a copy and delete,
>>> but a move between d:\here to \\Computer\thereshare will cause a
>>> physical copy and delete. Is that right?

>>
>> No. As I understand it, both moves would cause a copy and delete. The
>> computer from which the move is being done has no way to know whether or
>> not the two shares "hereshare" and "thereshare" are on the same volume.
>> As I said, the source and destination folders must have a common root,
>> but perhaps I should have defined that a little better, i.e.:
>>
>> The root folder on a drive (mapped or otherwise) is "{driveletter}:\" or,
>> "C:\". For a UNC, it includes the sharename: "\\server\share".
>>
>> /Al
>>

> There is one exception to the rule that move \\computer\thereshare\<file>
> \\computer\hereshare\<file> will do a copy/delete. If you are using UNC
> on \\computer, the network stack and file system will work together to
> determine if the two shares are on the same volume. If so, only the
> directory entry is updated.


Interesting, thanks for the information.

/Al


 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to improve the speed of file by file copy from a ntfs partition? Kerem Gümrükcü Windows Vista Drivers 4 06-13-2009 12:02 PM
NTFS copy/move within partition Johnny Chuah Server Security 18 02-20-2009 11:52 PM
NTFS copy/move within partition Johnny Chuah Server Security 0 02-07-2009 04:25 PM
NTFS copy/move within partition Johnny Chuah Server Security 0 02-07-2009 04:25 PM
Copy / Move File within NTFS Johnny Chuah Server Security 0 02-07-2009 04:20 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59