Jump to content

Recommended Posts

Posted

Hi to all,this is the firsth post in this forum!.Exuse me for a bad english but i'm italian :P...

I wante to know how to delete all the contents of a folder.For exsample a would delete the contents of the windows prefecth (C:\WINDOWS\Prefetch)...how to i can delete the all contents of folder...thanks

Posted

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

Posted (edited)

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
Posted

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.

Posted

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.

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
×
×
  • Create New...