Re: why does CopyFile choke on transparently encrypted files?
- To: mathgroup at smc.vnet.net
- Subject: [mg110267] Re: why does CopyFile choke on transparently encrypted files?
- From: David Bailey <dave at removedbailey.co.uk>
- Date: Fri, 11 Jun 2010 02:08:37 -0400 (EDT)
- References: <firstname.lastname@example.org>
On 10/06/10 13:11, Michael wrote: > Last night I ran into a puzzling error message when trying to run a > bunch of CopyFile calls intended to sync files on different > machines: > > > CopyFile::ioarg: Argument in CopyFile[...] is not valid for I/O operation.>> > > Most of the calls were succeeding, so I was puzzled as to why this one > failed. The permissions of the file and destination looked fine. > Then I noticed that the filenames were tinted green in Explorer (I'm > running Windows Vista Ultimate) - I had copied the files from an > external drive, and since I don't have BitLocker on the external drive > I had manually set the encrypt bit, but for some reason at some point > in copying them to my local drive it decided to retain the encryption. > > After I manually removed the encryption CopyFile worked fine. As an > experiment I also tried changing the file to "compressed" and CopyFile > still worked fine. > > Anyway, I am puzzled as to why Mathematica can't CopyFile a file with > encryption on it. Shouldn't the OS be transparently doing the > encryption? I can copy the file just fine from Explorer, or even from > a cygwin prompt, and when I look at the destination the file is NOT > encrypted, just like I would expect. What's Mathematica doing here > and what can I do to work around this problem? > > > Thanks, > > Michael > If you try copying the same file from a cmd box with the copy command it will say "access denied". I find that this can happen with some files downloaded from the internet. Try copying the file to another local file, and then copy that to its final destination. That seems to work with a cmd box, so my guess is that it would also work using CopyFile. The fact that it is possible to do this, makes it very hard to understand what the security logic of this is! David Bailey www.dbaileyconsultancy.co.uk