Mehmet Posted November 22, 2011 Share Posted November 22, 2011 klasör içini komple temizleme içinde adını bilmediğimiz dosyaların tümünü silme örneğin C:\WINDOWS\Prefetch C:\DOCUME~1\mehmet\LOCALS~1\Temp bu klasörlerin içi temizlenecek ama klasör silinmeyecek bunu DirRemove ile komple silebiliriz ve DirCreate ilede tekrar aynı isimde klasörü oluşturabiliriz ama bunu bir çok klasör için uygulayacağımdan o klasörler zarar görebilir diye sadece klasör içini nasıl silebilirim Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted November 22, 2011 Share Posted November 22, 2011 (edited) [font="Georgia"]Bi çalışmamda kullanmıştım, kendine göre düzenlersin..[/font] [font="Georgia"] [/font] [font="Georgia"][codebox]#Include #Include $Debug=0 Func KlasorBosalt($Klasor) $TumDosya=_FileListToArray($Klasor,"*",0) If $Debug Then MsgBox(0,"",$Klasor) If IsArray($TumDosya) Then If $Debug Then _ArrayDisplay( $TumDosya,$Klasor) EndIf For $i = 1 To $TumDosya[0] FileDelete($Klasor & "\" & $TumDosya[$i]) DirRemove($Klasor & "\" & $TumDosya[$i], 1) Next EndIf EndFunc KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\Temp") KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\Temporary Internet Files\Content.IE5") KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\Temporary Internet Files") ;KlasorBosalt (@HomeDrive & @HomePath & "\Cookies") KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\History") KlasorBosalt (@HomeDrive & "\Temp\Temporary Internet Files") KlasorBosalt (@WindowsDir & "\Temp") KlasorBosalt (@HomeDrive & @HomePath & "\Recent") KlasorBosalt (@HomeDrive & @HomePath & "\Application Data\Microsoft\Office\Recent") KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\Temp") MsgBox(0, "Durum", "Geçici doyalarınız silinmiştir.")[/codebox] [/font] Edited November 22, 2011 by SimpsoN_Bart Quote Link to comment Share on other sites More sharing options...
MostWanted Posted November 22, 2011 Share Posted November 22, 2011 [codebox]Func _FileFolderList($path, $ext="*") Dim $return[2][1000000] If StringRight($path,1) <> "\" Then $path &="\" $search = FileFindFirstFile($path & "*."&$ext) If @error = 1 Then SetError(2) If Not StringInStr(FileGetAttrib ($path), "D") Then Return SetError(1) $afile = 0 $folder = 0 While 1 $file = FileFindNextFile($search) If @error = 1 Then ExitLoop If @extended = 1 Then $folder += 1 $return[1][$folder]=$path & $file Else $afile += 1 $return[0][$afile]=$path & $file EndIf WEnd FileClose($search) $return[1][0]=$folder $return[0][0]=$afile if $folder >= $afile Then ReDim $return[2][$folder+1] if $folder < $afile Then ReDim $return[2][$afile+1] Return $return EndFunc[/codebox] Kendim için yazdığım bi fonksiyon _FileFolderList ile aynı görevi yapar aslında ama benim ona uyuzluğum var Şöyle bi örnek yapabiliriz, [codebox]$sHersey=_FileFolderList("C:\Users\Talha\Desktop\Yeni klasör3") ; istersen bi parametre daha ekleyip belirli uzantıların dönmesini sağlayabilirsin. For $i=1 To $sHersey[0][0] FileDelete($sHersey[0][$i]) Next For $i=1 To $sHersey[1][0] DirRemove($sHersey[1][$i],1) Next [/codebox] Olmadı ilk dediğin gibi yapıp ilk özellikleri bi değişkende depolatıp sonra tekrar o özellikleri verebilirsin.Kolay gelsin. Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted November 22, 2011 Share Posted November 22, 2011 [font="Georgia"]Üstteki kodlarda File ile Array kütüphanlerini yazıyorum gözükmüyor ilginç [img]http://www.tnctr.com/public/style_emoticons/default/mellow.gif[/img][/font] Quote Link to comment Share on other sites More sharing options...
MostWanted Posted November 22, 2011 Share Posted November 22, 2011 Ahaha forumun azizliği olsa gerek Quote Link to comment Share on other sites More sharing options...
SimpsoN_Bart Posted November 22, 2011 Share Posted November 22, 2011 [font="Georgia"]3 kere düzenledim olmuyor olmuyor [img]http://www.tnctr.com/public/style_emoticons/default/help.gif[/img][/font] [font="Georgia"]Neyse sağlık olsun ama işe yarar bi çalışmadır ccleaner den bozma temp silici [/font] Quote Link to comment Share on other sites More sharing options...
Mehmet Posted November 23, 2011 Author Share Posted November 23, 2011 (edited) teşekkürler ikinizin kodlarıda işime yaradı SimpsoN_Bart senin yazılmayan File ve Array kütüphanlerini birde ben deniyeyim başkasınada lazım olur diye bakalım olcakmı [codebox] #Include <File.au3> #Include <Array.au3> $Debug=0 Func KlasorBosalt($Klasor) $TumDosya=_FileListToArray($Klasor,"*",0) If $Debug Then MsgBox(0,"",$Klasor) If IsArray($TumDosya) Then If $Debug Then _ArrayDisplay( $TumDosya,$Klasor) EndIf For $i = 1 To $TumDosya[0] FileDelete($Klasor & "\" & $TumDosya[$i]) DirRemove($Klasor & "\" & $TumDosya[$i], 1) Next EndIf EndFunc KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\Temp") KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\Temporary Internet Files\Content.IE5") KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\Temporary Internet Files") ;KlasorBosalt (@HomeDrive & @HomePath & "\Cookies") KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\History") KlasorBosalt (@HomeDrive & "\Temp\Temporary Internet Files") KlasorBosalt (@WindowsDir & "\Temp") KlasorBosalt (@HomeDrive & @HomePath & "\Recent") KlasorBosalt (@HomeDrive & @HomePath & "\Application Data\Microsoft\Office\Recent") KlasorBosalt (@HomeDrive & @HomePath & "\Local Settings\Temp") MsgBox(0, "Durum", "Geçici doyalarınız silinmiştir.") [/codebox] [color="#FF0000"]Edit: oldu sanırım herhalde belki[/color] buda Extrası olsun ShellExecuteWait("RunDll32.exe"," InetCpl.cpl,ClearMyTracksByProcess 255") Edited November 23, 2011 by MeHMeTBeN Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.