Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2009
    Posts
    37

    Unanswered: Moving a number of files through VB

    Hi

    My database exports a file into specific location on our network and the file name contains the day it was exported in order to make it easy to categorise by the user. Next time the export function is run it creates another file - once again dated. I would like Access to archive the old file by moving it into an folder called archive. The file name however includes the date of the last export. How do I do this? With the "*" representing a wild card....

    I tried this:

    FileCopy gstrAppDirectory() & "Reports\Latest_Updates"*, gstrAppDirectory() & "reports\Archive\"

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    you could do this by using say some vbscript, or even copying the file line line by line within Access itself

    a third approach would be to timestamp the file

    eg
    myfilename_yyyyddmm_hhmmss.extension
    I'd rather be riding on the Tiger 800 or the Norton

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •