PDA

View Full Version : Copying binary files


sarah_anne
07-07-2005, 12:43 PM
I'd like to make a copy (backup) of a binary .mdb database file into the same directory as the original both weekly and on request if run from a browser, but I can't even get the latter to function correctly :rolleyes:

I managed to get a backup from (for example) VesselConfig.mdb to VesselConfig.bkup in the same directory by using normal Perl open/close stuff, yet when I tried to open it again Access reported that its format was wrong. So I did a bit of digging around and concluded that it's because it's a binary file I'm working with. So I just need to copy a binary file - looked on the net and have come up with what's below, but it still doesn't work.

#!C:\Program Files\perl\bin\perl.exe

use File::Copy;

copy("dev/vc/db/VesselConfig.mdb","dev/vc/db/VesselConfig.BKUP") or die "Copy failed: $!";

Is this the correct way to go about backing up one database file - and if it is, what might be causing the error below?

CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers

sarah_anne
07-07-2005, 12:54 PM
Aha! Those pesky content types are to blame! :rolleyes: :thumbsup: