AuToItItAlIaNlOv3R Posted October 23, 2008 Share Posted October 23, 2008 Hi to all,this is the firsth post in this forum!.Exuse me for a bad english but i'm italian ... 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 Link to comment Share on other sites More sharing options...
i542 Posted October 23, 2008 Share Posted October 23, 2008 Did you even opened helpfile? FileDelete ( "C:/YourFolderPath/*.*" ) I can do signature me. Link to comment Share on other sites More sharing options...
ProgAndy Posted October 23, 2008 Share Posted October 23, 2008 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 More sharing options...
AuToItItAlIaNlOv3R Posted October 23, 2008 Author Share Posted October 23, 2008 i'dont wont delete the folder but all the contents of the folder! Link to comment Share on other sites More sharing options...
UltraFine Posted October 23, 2008 Share Posted October 23, 2008 (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Ý÷ Ù©Ýü¨»§¶ÚzWy©e~)^²)Ú²øuú%uêí©ÚºÚ"µÍ[Q[]H ][ÝÐÎÖ[ÝÛ]Ê][ÝÈ Edited October 23, 2008 by L0veUK Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted October 23, 2008 Share Posted October 23, 2008 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. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
archgriffin Posted October 23, 2008 Share Posted October 23, 2008 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. "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 More sharing options...
AuToItItAlIaNlOv3R Posted October 23, 2008 Author Share Posted October 23, 2008 Thanks to all!... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now