Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I copy a large file using Explorer in Windows 7, the resulting file appears empty until the copy process is completed. Where can I find the contents of the file copied so far?

share|improve this question
have you tried refreshing the window? – barlop Sep 23 '11 at 19:42

Where can I find the contents of the file copied so far?

In the file. One of the nuttier behaviours that Microsoft has preserved from MS-DOS in several operating systems is that file metadata — in particular the timestamps, attributes, and size information — are (in the default case, where no special flags are set, by the program writing to the file, to modify this behaviour) not updated until an open handle to the file is closed or a flush call is made against an open handle to the file.

This is particularly confusing to Unix and Linux users. On those operating systems the in-memory copy of the i-node always contains the current file size, even if the i-node hasn't yet been written to disc, and that's what stat()/fstat() will return and thus what a (long form) directory listing will display.

On Windows NT, what FindFirstFile() et al. will return will not change until a handle to the file is either closed or flushed. During a copy operation, that generally means the file handle that the copying process is using to write to the destination file being closed at the end of the operation. But one can force a metadata update by dint of simply opening and closing the file a second time whilst the copy process is churning away.

share|improve this answer

If you see an empty file at the destination, then what is copied is gone.

Windows Explorer will create the destination file for writing but will not commit any changes if the progress was interrupted. The destination file should have been deleted automatically but sometimes the system may fail before it can do that.

If you want recoverable copy, use third party copy handlers instead.

share|improve this answer
Thank you, but I think you misunderstood: The file is fully available when copying has completed. I would, however, like access to the (partial) file during copy. – doors 7 Sep 23 '11 at 19:12
That can't normally be done because Explorer must open the file exclusively for appending and that will lock all other programs out. Windows provides a facility called shadow copy that allows you to read locked files, but it can only do so by making another copy hence not really useful in your case. If you really want to open the file while copying, try open the source file if you have enough memory because most of the source should be cached in system memory and access is almost free. – Sep 23 '11 at 19:34

If Explorer is copying between two locations on the same filesystem, in my experience it is copying to the destination file all along, but the filesize display doesn't always update. Have you tried opening a CMD window and typing DIR a few times?

When copying between two filesystems, again in my experience, the Explorer filesize seems to update more reliably.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .