Results 1 to 3 of 3

Thread: delete all dir and file but not the dir CSV

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Mar 2005
    Posts
    2,958

    delete all dir and file but not the dir CSV

    The path is:

    C:\Lavori_Vb6\GARDA_INF\CSV\

    how to?
    Attached Images Attached Images  

  2. #2
    Member
    Join Date
    Jul 2024
    Posts
    41

    Re: delete all dir and file but not the dir CSV

    use te function DIR and GETATTR for that

    and nest the directories so you can empty them one by one as you need to delete them

    If you want it simpler, use FSO:
    Code:
    fso.DeleteFolder sPath, TRUE

  3. #3
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    5,277

    Re: delete all dir and file but not the dir CSV

    Quote Originally Posted by prote01 View Post
    use te function DIR and GETATTR for that

    and nest the directories so you can empty them one by one as you need to delete them

    If you want it simpler, use FSO:
    Code:
    fso.DeleteFolder sPath, TRUE
    Or just use SHFileOperation-API to nuke folders
    Last edited by Zvoni; Tomorrow at 31:69 PM.
    ----------------------------------------------------------------------------------------

    One System to rule them all, One Code to find them,
    One IDE to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    Code is like a joke: If you have to explain it, it's bad

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