in reply to Copy Database to another location

Some points:
  • I like neilwatson's comments. They make sense. Make sure you are doing this when no one should be using the database.
  • Microsoft Access keeps rollback data in hidden tables within itself and its cleanup utilities for this have been historically bad. That means you will have to run a macro within it to force it compress itself, like:
    #!/usr/bin/perl -w use strict; use Win32::OLE; my ($acc) = Win32::OLE->new("Access.Application"); $acc->{Visible} = 1; $acc->OpenCurrentDatabase("c:\\temp\\foo2.mdb"); $acc->DoCmd->RunMacro("mcroSayHello"); 1;

    Read the docs on how to create a macro or just use this code: 495924.

  • Lastly, I would probably check the file size on the target to ensure you actually moved everything over. You can use WMI or something for that.
  • Celebrate Intellectual Diversity

    Replies are listed 'Best First'.
    Re^2: Copy Database to another location
    by Anonymous Monk on Feb 07, 2006 at 23:01 UTC
      Thanks for all your recommendations!
      I think I will just use the Document file that is output from the Cold Fusion Front end which will give me the records I need. Then use this Script to transfer the Document file to the infoserver. This works but was wondering how I can check if the copy was successful?
      use strict; my $listFile = "C:\\theDoc.doc"; my $listFile2 = "\\\\theinfoServer\\dir\\"; open(LIST, $listFile) || die "Cant open $listFile : $!"; while(<LIST>) { #Can I put a Exception statement for this system command? I am not +familiar with Exceptions in Perl system("copy $listFile $listFile2 > nul"); } close(LIST); print "Successfully copied\n";