Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Nov 2011
    Location
    Morley, UK
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts

    MSDOS - Delete all files/folders in a Directory, but keeep the directory

    Hi Guys

    I want to delete all files/ folders (empty or not) from

    C:Temp

    But I don't want to delete the folder "Temp"

    How do I do it?

    reference to DelTree & RMDIR don't seem to accommodate what I want to achieve

    Del/Delte will delete files but leave the folders within "Temp"

  • #2
    Regular Coder
    Join Date
    Apr 2012
    Location
    St. Louis, MO
    Posts
    985
    Thanks
    7
    Thanked 101 Times in 101 Posts
    DELETE *. should remove the folders.
    ^_^

    If anyone knows of a website that can offer ColdFusion help that isn't controlled by neurotic, pedantic jerks* (stackoverflow.com), please PM me with a link.
    *
    The neurotic, pedantic jerks are not the owners; just the people who are in control of the "popularity contest".

  • #3
    New Coder
    Join Date
    Nov 2011
    Location
    Morley, UK
    Posts
    41
    Thanks
    7
    Thanked 0 Times in 0 Posts
    Hi Wolf

    so would it be
    DELETE *. C:\Temp?


  •  

    Posting Permissions

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