27

I'm using IMAPSize to backup my mailboxes. The process just dumps the contents of your mailbox into .eml files on your disk. Anyway, the first mailbox I backed up shows up as I expect. However, the next one doesn't show in Explorer and, if I enter it in the address bar, it tells me that it doesn't exist.

However, IMAPSize is insisting that the files are there. (A lot of disk writing was being performed during the operation.) Moreover, the directory does appear in the Windows directory dialog and - as I have GNU tools installed - it shows in ls (but not in the native dir). I can't cd into the directory, but ls does seem to be able to access it (and, indeed, the directories and files I expect appear to be there).

command prompt window showing the listings

Also note that the timestamp and filesize of backup.db are different in the dir and ls -l output.

In short: What is going on here and how do I fix it!?

Ben N
  • 42,308

1 Answers1

64

Let me guess: the program that created the file, and also the GNU utilities, are not running as administrator.

First, some history. In the days of Windows XP, lots of programs assumed they would always be run as admin, and would write to places like C:\Windows and C:\Program Files (x86) with wild abandon. With Vista, Microsoft tried to make fewer people admins, but standard users can't write to those places. They needed those dubious programs to keep working (or else people wouldn't upgrade). So, they introduced a magical feature called UAC virtualization.

Programs running as standard users might think their writes to important locations succeeded, but in reality, Windows squirreled the data away in a per-user location. When those programs look for files in a directory, Windows checks to see whether there are any files in that place's virtual store, and if so, it adds them to the directory listing. (There is equivalent functionality for the Registry.)

It looks like your mail program tried to write to a place under Program Files (x86) while running as a normal user. The write was redirected, so it didn't actually go to that place. The program can still see it, because Windows is keeping up the illusion for it. Explorer doesn't see it because it announces to the operating system that it's well-behaved and so doesn't need redirection. The command prompt's dir command isn't a program (it's just a feature of cmd.exe), so it is also considered "in the know" and so is not shown the compatibility files. ls is a program that is, evidently, not in the know, so it gets to see the compatibility files.

You'll find your file here:

%LOCALAPPDATA%\VirtualStore\Program Files (x86)\IMAPSize\backup

While poking around in VirtualStore, you might be surprised at what programs are not well-behaved and need the virtualization safety net.

If you want to stop the redirection, run the program as administrator, or save your backups in a location that you can actually write to without admin privileges.

Ben N
  • 42,308