Jump to content

Delete the contents of a folder


Recommended Posts

Or use

DirRemove( "C:/YourFolderPath/" )
DirCreate( "C:/YourFolderPath/" )

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

i'dont wont delete the folder but all the contents of the folder!

already explained by i542, Read the help file for FileDelete() DirRemove()

and as he told you before you can delete the files as follow

Example:

FileDelete ("C:/YourFolderPath/FileName.Extention" )
FileDelete ("C:/YourFolderPath/FileX.txt" ) ;~ Drive letter+Folder Name+File Name+ File ExtentionoÝ÷ Ù©Ýü¨»§¶ÚzW­y©e~)^²)Ú²øuú%uêí©ÚºÚ"µÍ[Q[]H
    ][ÝÐÎÖ[ÝÛ]Ê][ÝÈ
Edited by L0veUK
Link to comment
Share on other sites

I hope \Prefetch only was a example because those files are not supposed to be deleted. Their purpose is to speed up application loading times and cleaning that folder will only increase the time to boot windows and start apps.

Link to comment
Share on other sites

I just wanted to make a quick note, there are many cases where people just want to delete the files within a folder and not the folder itself because of file permissions on the folder itself and what it has set for inheritance on the way down the chain.

I'm not sure why, but I just felt like that needed saying. :P

"Human kind cannot gain anything without first giving something in return, to obtain; something of equal value must be lost."The Help File is truly your friend.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...