Results 1 to 5 of 5

Thread: Erase Disk

  1. #1
    Join Date
    Dec 2002
    Location
    Columbus, GA
    Posts
    81

    Unanswered: Erase Disk

    Is there any way to have Access 2000 erase a disk? I can do it through a button or would like to also try doing it on something else. I have a module that runs and imports a txt file from a disk and puts it in a table. I would like to wipe out the disk once the tabel has been uploaded. Sometimes the person who gives me the disk may have put other files on there so I want it to delete everything.

    The file I am given is the same name everyday. I dont want to risk them not saving the data and seeing the old file on there and think it is the new one. I would like Access to simply format the disk once it is done uploading the data.

    The problem is taht i am about to hand this database over to the people who give me the disk. I dont want to risk them using the old file obne day. I want to ensure when they go to upload the data, they arent using an old file. If I could have access format the disk once they upload the data, I wont have to worry about that.

  2. #2
    Join Date
    Jan 2003
    Location
    Aberdeen, Scotland, UK
    Posts
    168

    cleaning disks after use

    Shell "c:\winnt\system32\format.com a:", vbNormalFocus

    it prompts the user for the disk. Will that do? There's probably an option for not prompting. If there's not you could write a loop to get the name of each directory and delete them one by one. Not quite formatted but as good as.

    will that do?
    J.

  3. #3
    Join Date
    Dec 2002
    Location
    Columbus, GA
    Posts
    81
    It works but I would rather erase the disk than format it. It would be easier and faster.

  4. #4
    Join Date
    Apr 2002
    Posts
    139
    Try

    Kill "A:\*.*"

    Take great care with the Kill command in VBA, there is no such thing as a warning or "are you sure?"

    hth

  5. #5
    Join Date
    Dec 2002
    Location
    Columbus, GA
    Posts
    81
    The KILL worked great. Becuase we are uploading the data and making sure its good before we erase the disk, I am ok with it. I did NOT want any warnings to appear either so it works great.

    Thanks for the help.

Posting Permissions

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