Recently I've been working on a multifunctional batch file that will make deleting, reformatting, cleaning, transferring, and locating files quickly. Anyways one of my function in the file is to Delete "Temporary Internet Files" and Temp files from my computer. I have came up with the following code which is somewhat successful.
echo Deleting Files Del /F /S /Y C:\Users\%Username%\AppData\Local\Microsoft\Windows\Temporary Internet Files\ pause DEl /F /S /Y %TEMP% echo Complete pause
Note this is just Part of my code not the whole thing.
So anyways when it goes to delete the "Temporary Internet Files" it says "The system could not find the file specified" Then I tested maybe I Had the %username% input variable wrong so I skipped that and just put my User name in their and it still didn't work, I think this may be due to the fact that the file in the folder "Temporary Internet Files" are hidden and so is Appdata which is like the fourth parent to that file.
So anyways my question is. Is there anyone to access those folders with another batch file command or maybe something like I did for TEMP, also is there a way to override the Hidden folder so it deletes them anyways, and finally if you could help me out on this one is their any other TEMP folders or files that could be deleted and remember I"m using vista so the directories may be different if you not using Vista.
And please don't just tell me "Oh you could easily do this with CCleaner" I'am well aware that CCleaner is a great free application that can do a lot of this but I really what to create this myself.