Results 1 to 3 of 3

Thread: A Qn on VB6

  1. #1
    Senior Member Falcon21's Avatar
    Join Date
    Dec 2002
    Location
    Singapore
    Posts
    252

    Question A Qn on VB6

    I have a question on visual basic 6 and need your help

    I am making a tiny program to clean up junk files but can't find a good way to remove folders that contains folders and files. I am a beginner and I don't wish to use any API for this.
    I want to delete every files individually use the 'kill' function after cleaning up the content of the file.
    I am using a DirListBox and a FileListBox to find and remove files and empty folders.

    Does anyone know how can I remove folders that contains folders and files? I have been looking for ways to do this using the DirListBox and FileListBox but it is too complicated for me as a beginner. Any helps will be greatly appreciated.


  2. #2
    AO French Antique News Whore
    Join Date
    Aug 2001
    Posts
    2,126
    Why use VB when you can use a simple batch file?

    See this thread for the batch file programmation - http://www.antionline.com/showthread...hreadid=257320

    In batch file, you can use the deltree option to delete folder with subfolder.
    -Simon \"SDK\"

  3. #3
    Originally posted here by SDK
    Why use VB when you can use a simple batch file?
    Why not give the guy the answer he wanted. Damn man...

    Instead of useing Kill (file_path) use RmDir for directories

    Then use... If Dir (The_File_or_filepath) <> Empty = false Then msgbox "file not found blah blah blah" ,vbcritical "Screw batch files"

    You know to sort of check if files exist. There you have it... no lame batch files needed.

Posting Permissions

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