10

I have a large folder with >100k files. I moved it into my archive folder and its taking forever to move. Why is that? I know on XP it takes less than one second but not on Windows 7. I am sure its a permission thing, is there a way I can disable it and make it faster?

I am moving the folder into another in the same drive/partition. In XP. As far as I know it just moves the folder file from one place to another. In Windows 7, it seems like its touching something in every file when I move it.

What can I do to fix this? Drop permission properties?

  • 3
    I don't know why you would be so sure that it is a permission thing. Take another look at other variables that may have changed (network lag, copying to a USB drive, etc.) What other info should we know about what you are moving, from where are you moving the files, and where to are you moving the files? – Chris Dwyer Mar 26 '10 at 23:01
  • Wait for SP1??? – Lawrence Dol Mar 27 '10 at 7:39
  • I'm wondering this too, some tings I intended to try but not having had the time yet: Is it filesystem specific; i.e. does it matter whether its FAT32 or NTFS? Disable indexing for the filesystem (in case the time goes into updating the search indexes). – user12889 Feb 4 '11 at 2:40
  • @user12889: I am not sure what i did but ATM on my NTFS drives it moves instantaneously. I dont know if its because i disabled "Remote Differential Compression" (maximumpcguides.com/windows-vista/…) or if it was something fixed in one of the windows updates. – user3109 Feb 4 '11 at 4:56
6

It happens when I use Windows Explorer to move (or to cut and paste).

The only way around this that I know of is to use something other than Explorer to move the directory. For example from Windows' cmd.exe, using move a b moves even large directories instantaneously. The same goes for Cygwin's mv command.

| improve this answer | |
  • 1
    How does this answer the question in the title? – soandos Sep 23 '12 at 5:09
  • 1
    The answer implied in my post is "Because Explorer was used". The original question "Why does moving large folders take a lot of time?" lacks info on how the move was done. Because of that, if I answered "it happens when you use Explorer". I might be off the mark. I do know that Explorer is the cause on my system, and I share this with you. Surprising as it may seem, before I posted, no one explicitly named Explorer as the culprit. Yes, I'd like to know why Explorer is so slow. As long as there is no known fix, I give a workaround using on-board means, answering "What can I do to fix this?". – Rainer Blome Sep 24 '12 at 9:11
3

When a folder appears to move instantly, it's because the operating system has been able to update the file allocation table* without moving the actual file data.

It's slower to do this with small files, as for each one a change has to be made in the table. If the files are really small, this may even take a similar amount of time to actually moving their data.

I don't know in exactly what circumstances the file data has to be moved when it's on the same partition as its destination but I would assume there's nothing you could do to avoid it. As other commentators and answers have hinted at, copying to a different drive (different disk, different partition, to a USB stick, to a drive over the network, etc) would of course mean you had to copy the full data, so things will be slower. You will be affected a lot more by the bandwidth of what you are copying to.

(*Think of file data as books in a library, and the file allocation table as a set of index cards showing you which section the books are in)

| improve this answer | |
  • i looked at the FAT32 format before. I think instead of moving the folderid its updating permissions on every file because the new parent folder may have new permissions. I dont need any permissions here so and so if i could turn it off and move fast i'd do it. – user3109 Mar 27 '10 at 20:22
1

It appears that whenever Windows Explorer tries to move (or copy) a folder, it takes an extra validation step. If this takes over a couple seconds, you can see the status message "Discovering items". This appears to be taking inventory of all of the files in the folder; in the same way that actually opening that folder in Explorer does.

This step may be needed in some cases, but it should not be needed for most "move this folder from here to there" operations. To further speculate -- it seems plausible that doing this validation solved some bug in a better way for some cases, and Microsoft never thought it important to improve performance for the odd-cases of having "more than hundreds" of files in a folder. Such problems might include: when merging folders; if the destination folder is on different media/partition; maybe to check if new file paths will be too long for NTFS. IMO, any/all of these could have been checked in advance, to avoid doing this extra indexing operation, but I know that edge-case performance is often ignored.

| improve this answer | |
0

I haven't used XP in ages, but just be aware that moving large quantities of small files is much slower than moving small quantities of large files, at least in Windows 7.

Also, moving files between the same drive is much faster than moving files between different drives, sometimes instantaneous.

| improve this answer | |
  • i edit the question. – user3109 Mar 27 '10 at 1:23
0

This doesn't necessarily answer WHY it happens..

http://www.codesector.com/teracopy.php

I've been using TeraCopy as of late and noticed it does seem to copy a bit faster.

| improve this answer | |
  • a bit faster or moves instantaneously like it did on XP? – user3109 Feb 4 '11 at 1:55
  • A bit faster (if at all). It still does not do it anywhere near instant. – user12889 Feb 4 '11 at 2:37
0

Right now folders move in an instant. I remember in the past turning off "Remote Differential Compression" http://maximumpcguides.com/windows-vista/disable-remote-differential-compression/ but ATM it is checked off so i believe it was something fixed in one of windows updates.

| improve this answer | |
0

Try using the command prompt command

copy source destination.

I used this and 20k files copied immediately.

| improve this answer | |
  • Just an FYI - SuperUser is for answers and nothing else. I edited your answer to reflect that. Good answer, though! – Jon May 7 '14 at 4:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy