Shadow Copy support in DOpus?

I recently tried copying a file that was still "open" into another lister and got the dialog warning that it was still it use by another application. This incident made me wonder whether Windows Shadow Copy support is built into DOpus...and I'm wondering if there's an option for this in the current version.

If there isn't...I'm also wondering if anybody has been able to figure out how to copy files in use while doing these operations in DOpus via code. Thanks.

Did you really try to Copy a file, or did you try to Move the file? When i open a document in Word and
i try to copy the .doc file with DOpus, i can copy the file, but i can't move the file (because it's in use)....

It depends how the file is locked. When programs open files they specify whether other programs should also be able to open them for read and/or write access.

As I understand it, the Shadow Copy stuff exists to allow backup tools to save files even if a program has them open and told the OS not to allow other programs to read the file. (I think it may also get you a version of the file as it looked before it was opened so that the file isn't backed-up half-way through a change in a corrupt state.)

I've never heard of the Shadow Copy API being used outside of backup services which run with Administrator rights and bypass file permissions so I'm not sure how suitable it would be to use it in a file manager.

It might be better to ask the authors of whatever program is routinely opening files that you want to copy, with denied read-acess sharing, why they are doing that and if they can stop doing it. There may be a good reason that they are denying read access to other programs (e.g. so you don't copy an inconsistent set of files) or they may simply have set the deny-read flag without really thinking about it. Either way, it's not normal for a file that you'd typically be copying -- a data file that isn't being written to -- to be locked with read-sharing denied.

I am sure that GP Software has assigned several of their staff of elite programmers to look into including support for VSS and will incorporate it in the near future. Right Jon? ... Jon? :slight_smile: Well, maybe a feature request.

The original concept of Volume Shadow Copy Services (VSS) was to allow a file server (W2003) to take "snapshots" of a volume on a scheduled basis for archiving user data. That way, users could restore data files from a snapshot of their choice when they screwed them up. Note, the snapshot is on a per volume, not folder, level. The snapshots are differential so you don't wind up with a mirror of the volume. If you bring up the properties for a volume in the server (2003 and 2008), there is a tab for Shadow Copies and you can enable a volume and set the schedule for snapshots. There is also a button to create one now.

The way the recovery works, is similar to what you see in Vista where you right click on a file and you see a choice for "restore previous version". Alas, If you delete your file by mistake, there is nothing left to click on. You have to create another one in the same folder with the same name and then you can recover it.

As you point out, most of the programs that make use of VSS are backup programs, including system backup itself. Up until Vista, most of these kept backups in proprietary formatted files so you could only get copies of stuff by doing restore. Perhaps you just wanted to put a copy of a few files or folders somewhere where you could reference them. In that case ntbackup was not handy. Each database seems to have its own backup program. It looks like Vista uses Zip files, Server 2008 has a new backup system. You have to install it as a separate feature. I have not looked into it, we are not using server 2008 at the moment.

In Vista, and Server 2008, restore points are VSS snapshots and can be accessed to some extent via vssadmin. In fact, vssadmin in Server 2003 and 2008 will allow you to create a snapshot of a volume, use it to copy stuff, and then delete the (latest) snapshot. Naturally, snapshots are read only. DO, is the only file manager that I have used that will allow pasting the snapshot volume ID into the location field and accessing it, copying any file or folder that you have permission to access. The other file manager wannabes may do this, but I don't have any of them to try. I have posted a procedure to do this, using DO, a couple of times. It is somewhat labor intensive. As you point out, the permissions on the snapshot are the same as the volume itself. Note that snapshots can be on any volume, including the system volume. The snapshot ID looks like: \?\GLOBALROOT\Device\HarddiskVolumeShadowCopy1
You may want to use "vssadmin list shadowstorage" to see how much space is reserved for snapshots and "vssadmin resize shadowstorage" to manage it. My laptop came with unlimited shadow storage and it had grown to about 12GB before I realized it.

I have my own program that will allow me to copy open files, like SQL Database files, registry files and other System or open files using a VSS snapshot. In fact, you can create a snapshot of a volume and mount it as a drive letter or a directory (but not in XP). I can copy the complete system partition and then, with some modifications to the copy's registry, make it bootable. DO can be used to send the program a list of folders/files to be copied.

If you can get your hands on VShadow from the SDK, it will allow creation and manipulation of snapshots and includes the source code (C++). The VSS API's are a little grotesque and documentation was pretty sparse until the Vista upgrade to the SDK. The creation of a snapshot involves about 9 or 10 steps, some of which are asynchronous, and it includes notifying Writers (what are Writers? from the command line, try "vssadmin list writers" to see them).

Lou