With the release of Windows 8, I wanted to take time to try out some of the new file features. This might seem a bit trivial, but in fact, for years Windows has had some severe issues with the way it handles files—especially copying, moving, and deleting using Windows Explorer.
Windows 8 presents a complete overhaul of the way Windows Explorer functions. Although it might seem hard to believe, there are more changes and new features to Windows Explorer than I could fit in this single blog. So right now I’m going to focus on just the file management aspects, and later discuss some of the additional new features.
For starters, one thing that has bothered me for ages about Windows is when I copy large directory trees, or worse, delete directories filled with hundreds or thousands of files, Windows first pops up a message box saying that it’s calculating how much time the operation will take. And that calculation alone can take tens of seconds, or even minutes—all before Windows even gets to the actual work of copying and deleting.
Windows 8 finally fixes that annoyance regarding copying. Prior to copying, Windows 8 does a quick “discovery” where it determines all the files to copy. I tested this by copying a directory tree comprising dozens of subfolders, about 3,800 files, and about 175 megabytes. The whole discovery happened so quickly, I barely had time to get a screenshot in, but here’s what the window looks like:
Then the actual file copying begins. I’m not concerned with how long this takes, because I know in this case I’m limited by the speed of the actual hardware, which really has little to do with Windows itself. (And I’m assuming that Windows 8 maximizes the copy operations in terms of using as much memory as needed to make the copying of each file as fast as possible.)
Now if you are copying a directory tree onto another directory tree, then during the copying–not during discovery–Windows 8 will see that there’s a file conflict whereby the file in the source (i.e. starting) directory has the same name as one in the destination (i.e. final) directory. When Windows 8 encounters, this, it doesn’t halt the operation or pop up a message as it did before; instead, it makes a note of the conflict, and continues on. Only after it’s all finished does it present you with a list of conflicts.
In my case, I modified one file in the file tree, and then tried to re-copy the entire tree over from the source to the destination. That meant there would be 3,800 conflicts, but only file that actually changed. At the end of the re-copying, Windows discovered that one file was different and the rest of the 3,800 were the same. First Windows asks me what I’d like to do:
I chose the third option, “Let me decide for each file.” Then here’s the dialog box it presented me with:
Notice the checkbox at the bottom regarding skipping files with the same date and size. If I check that, all the files in the list disappear except for the one that’s in conflict. I had no reason to re-copy those (since they were the same), so I checked that. Then the list only showed the one at the top. For that I have a choice: I can keep only the source file (i.e. copy it over), or I can keep the destination file (i.e. don’t copy), or I can keep both. In the latter case, which is the one I chose, what happens is the file I’m copying does get copied, but the name gets changed so you don’t lose the one already there. Windows tacks on a 2 inside question marks, and then saves it accordingly.
But what was odd was that while in the end I’m only copying a single file, it still took several seconds to do the copying, while Windows scanned through all the directories. I’m not sure why it did that when I only had one to copy.
Now what about deleting? Unfortunately, deleting hasn’t really improved. The deleting still uses the old approach. I next deleted the entire tree, and instead of just doing it, Windows first gathered up all the files, while displaying this dialog box, which changed as Windows discovered the files:
Just like the old Windows, this discovery took over 30 seconds. Then the deleting actually occurred, which only took about one second. So not really any improvement there.
But the fact is, if you’re a power user like me, you’re probably not relying on Explorer to copy all these files. Instead, you’ll probably use a cool command-line utility that first shipped with Vista (although supposedly it was part of the resource kit as far back as Windows NT). The tool is called Robocopy. Robocopy doesn’t do any discovery; it just grinds through and copies all the files, allowing for the option of skipping files that match. The end result is an extremely fast file copy operation. Copying the entire tree, while detecting only a couple files that changed (and thus only copying those files) took only a couple seconds—this included the time to grind through all the directories, figure out which files have changed, and then only copy those files. And for deleting, you can use two command-line operations in sequence:
del /S /Q *
Then move up one directory and delete the directory itself, along with all its subdirectories:
rd /S /Q mydirectory
So I see there are some improvements in Windows Explorer’s file copying and deleting that will help with your file copying and deleting. And if you’re not happy with the choices, you can still use the cool Robocopy command line tool for extremely fast, robust copying.