why does CopyFile choke on transparently encrypted files?
- To: mathgroup at smc.vnet.net
- Subject: [mg110265] why does CopyFile choke on transparently encrypted files?
- From: Michael <michael2718 at gmail.com>
- Date: Thu, 10 Jun 2010 08:11:32 -0400 (EDT)
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