ĎÁŗҚ ĉҰρҢềŔ (10-11-2009),ac1d_buRn (10-21-2009),CounterAct (11-14-2009),godofnade (10-20-2009),guza44_44 (11-03-2009),Nitehawk772 Bkup (10-22-2011)
Just thought i would help out some people
heres a very easy way to delete a file.
or to delete all files in a folderCode:Kill("C:\%Folder_Name%\FILE_Name.*extension")
See! Easy!Code:Kill("C:\%Folder_Name%\*.*")
ĎÁŗҚ ĉҰρҢềŔ (10-11-2009),ac1d_buRn (10-21-2009),CounterAct (11-14-2009),godofnade (10-20-2009),guza44_44 (11-03-2009),Nitehawk772 Bkup (10-22-2011)
I do apologize for my extreme nubness..
Is there a general profile reference like this logic:
Kill ("%userprofile%\cookies\*.*")
Kill ("%userprofile%\temp~1\*.*")
Kill ("%userprofile%\tempor~1\*.*")
Also, is there a way to include all paths into one string? again.. I do apologize for my stupidity. I just started reading into vb. I wanted to make a basic cleaner with a progress bar. Alittle assistance would be most appreciated thx guys.
Thanks man
Helped me.!
yes %userprofile% is the path to the current profile. it doesnt work with the kill command though.
to delete temp you would do this-
to delete windows temporary history -Code:System.IO.File.SetAttributes("C:\Windows\Temp\*.*", System.IO.FileAttributes.Normal) ' changes read only files in Windows temporary folder to attribute normal Kill("C:\Windows\Temp\*.*") " deletes windows temp files
to delete history -Code:Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 8")
to delete cookies -Code:Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 1")
Code:Process.Start("rundll32.exe", "InetCpl.cpl,ClearMyTracksByProcess 2")
Last edited by XGelite; 10-21-2009 at 08:27 AM.
wow thanks a million XGelite. So its more of taking advantage of IE's already made deletion feature rather create your own path. Very interesting!
+Kudos!
ok so i am creating a multi tool and i put this code in
is that correct?Code:Kill("C:\Nexon\Combat Arms\ & *.TMP")
No, Correct would be:
But what happens if there is no temp file? The program will crash.Code:Kill("C:\Nexon\Combat Arms\*.TMP")
So you will need to put an error proventing system on it.
I chose to do:
And that will stop the program from crashing (:Code:On Error Resume Next (i think thats it) Kill("C:\Nexon\Combat Arms\*.extention")
Thanks me :P
I should use:
Code:Try Kill("C:\Nexon\Combat Arms\*.TMP") Catch ex As Exception msgbox("Failed") End Try
-Rest in peace leechers-
Your PM box is 100% full.
but what if i want to delete the directory itself??? along with all the files...?
then wat wd the code be for that?
Or something like that!Code:My.Computer.FileSystem.DeleteDirectory("C:\.........", FileIO.DeleteDirectoryOption.DeleteAllContents)
-Rest in peace leechers-
Your PM box is 100% full.
ark1227 (11-02-2009)
o lol.... thanks!
im gna try it and post the results... THANKS!
EDIT - yo wrd bro... it actually wrks... *props*
Last edited by ark1227; 11-02-2009 at 05:33 PM. Reason: results