Results 1 to 3 of 3

Thread: One line of code to delete all files on a floppy?

  1. #1

    Thread Starter
    Frenzied Member wengang's Avatar
    Join Date
    Mar 2000
    Location
    Beijing, China
    Posts
    1,604
    Hi

    Is there a simple code for deleting all the files and folders and all subdirectories and any files in them as well with one line of code?

    I tried Kill ("A:\*.*") but it doesnt work


    Any ideas?

    Thanks
    Wengang

    Wen Gang, Programmer
    VB6, QB, HTML, ASP, VBScript, Visual C++, Java

  2. #2
    Fanatic Member
    Join Date
    Mar 2000
    Location
    That posh bit of England known as Buckinghamshire
    Posts
    658

    How about three lines?

    Code:
        Dim fso
    
        Set fso = CreateObject("Scripting.FileSystemObject")
        fso.deletefolder "a:\*.*", True
    Iain, thats with an i by the way!

  3. #3
    Guest
    Code:
    Shell "DELTREE /Y A:\*.*"

Posting Permissions

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



Click Here to Expand Forum to Full Width