Results 1 to 4 of 4

Thread: Delete a file

  1. #1
    Join Date
    Apr 2004
    Posts
    173

    Unanswered: Delete a file

    How do you go about deleting a file with a specified path and file name from inside access. Has anybody done this before?

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    Use the FileScriptingObject.

    You can read about it in the help file, I think there's even an example for deleting files.
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2004
    Location
    Chicago, IL
    Posts
    1,312
    It's the Kill command.

    On Error Resume Next
    Kill Path & Filename
    On Error Goto 0

    The other lines are in case the file doesn't exist. Substitute the path and filename with the actual path and filename.

  4. #4
    Join Date
    Apr 2004
    Posts
    173
    Thanks. Works like a charm. Thank you again.

Posting Permissions

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