Results 1 to 8 of 8
  1. #1
    Join Date
    Nov 2003
    Posts
    74

    Unanswered: check and save filename

    hi,

    how can i retrieve the filename in that folder???

    i wanted to save a file and how do i check that i do not overwrite the file i have in the folder???

    example. i have a file named "AccessDB.mdb" and i want to make a copy and named it "AccessDB1.mdb"
    how do i have an auto increment number behind the filename??? if another user copy the file again, how can i force it to saved as "AccessDB3.mdb"???? how can i check if there is same filename in MY FOLDER????


    pls advice
    nono

  2. #2
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    In a module, use the Dir command and a loop to see if the file exists.

  3. #3
    Join Date
    Nov 2003
    Posts
    74
    i have try but still cannot work. maybe i have done something wrong in my code.


    pls advice
    nono
    Attached Files Attached Files

  4. #4
    Join Date
    Nov 2003
    Posts
    74

    Unhappy

    can somebody help????

  5. #5
    Join Date
    Oct 2003
    Location
    Canada
    Posts
    574
    You said that it cannot work. Are you getting an error message?

  6. #6
    Join Date
    Nov 2003
    Posts
    74
    hi,

    i mean that the saving filename process cannot be continued after the third try. when i try the 1st time, it will saved the filename with date (filetobebackup231103.mdb).

    i do it the 2nd time, the filename saved will be "filetobebackup231103_1.mdb"

    but when i try the 3rd time, it cannot be done. debugging will be prompt. how can i backup the file in an incremented manner.

    at the 3rd time, i wish to save the file as "filetobebackup231103_2.mdb"

    how can i do that???

    pls advice
    nono

  7. #7
    Join Date
    Feb 2002
    Posts
    2,232
    Have you tried using the filesystemobject ?

  8. #8
    Join Date
    Nov 2003
    Posts
    74
    hi,

    can u briefly explain on that. i am not very sure of it.

    thanks
    nono

Posting Permissions

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