CopyFile Object

Results 1 to 2 of 2

Thread: CopyFile Object

  1. #1
    Jeremy #121 Guest

    Default CopyFile Object

    Hi-<BR><BR>I have a group of files that I have automatically backedup to a different drive every Friday using CopyFile Object. However, rather then just send them there, and next week have them overwritten, I want to change the file name (ie. file03/23.mdb, file03/28.mdb). So that way I have a few copys that extend back about a month.<BR><BR>Here is my code now...<BR>Dim filesys, mailfile<BR>Set filesys = CreateObject("Scripting.FileSystemObject")<BR>File System.CopyFile "c:websitesecured*.*", "d:websitesecured\"<BR><BR>Heres the idea I want it to do...<BR><BR>Take c:websitesecuredafile.mbd and save it as d:websitesecuredafile03/23.mdb. The catch is it has to do this to a group a files.<BR><BR>Jeremy #121<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Use named DIRECTORIES...not files...

    You can&#039;t cause CopyFile to change the file names of a bunch of files. You&#039;d have to go through the files one at a time, giving each a new name.<BR><BR>INSTEAD, why not put *ALL* the files into a NEW SUBDIRECTORY named for the date when the subdir is created???<BR><BR>FileSystem.CopyFile "c:websitesecured*.*", "d:websitesecured26March2001\"<BR><BR>then next week<BR><BR>FileSystem.CopyFile "c:websitesecured*.*", "d:websitesecured2April2001\"<BR><BR>etc.<BR><BR>Y ou can learn how to create a new subdirectory from ASP by reading the ASPFAQs, category FileSystemObject.<BR><BR>

Posting Permissions

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