We had a situation in the company this week which required us to deliver the whole EPiServer virtual path provider file structure to the client – zipped. Easy enough… go to the EpiServer VPP directory and… well… ok… hmm… so the path provider is versioning and as a consequence the physical organization of files on the disk does not make any sense for a human trying to browse it.

Fine! So let’s create a native provider and do a copy and paste within the file manager…. hmm an exception complaining about the provider incompatibility…

Naturally, my knee-jerk reaction is – let’s do it with the PowerShell… which I recall was doing something like this in it’s previous version… The example I’ve tested and placed in the “Samples” tab was:

Now that didn’t work at all, and turned out to be a bug in my PowerShell plugin’s PSDrive provider. Unfortunately when I attempted to fix it by implementing the copy in the naive way – using UnifiedDirectory’s Copy method I’ve run into the same exception about incompatibility between the classes that I’ve seen when trying to copy the files form the file manager.