Marthax Posted May 9, 2004 Posted May 9, 2004 hey guys!now that i finished my batch file i wanted to clean up the computer a little bit so that the unnecessary files that were copied to the computer during the installation will be deleted. the command for deleting a folder or a file is "del" right? besides that i also want it maybe to empty the recycle bin..maybe it's not necessary for the installation but it would be good to know the command. Does anyone know the command to empty the recycle bin?
diesel_98a Posted May 9, 2004 Posted May 9, 2004 yeah just use the del to deleted some items & rd to remove directories. i have posted some code that i use for mine. this is my entire reboot.cmd.cmdow @ /HIDnet user aspnet /deleteshutdown.exe -r -f -t 90 -c "Windows XP will now restart in 1 minute..."MD "%systemdrive%\Documents and Settings\All Users\Start Menu\Programs\Misc"MD "%systemdrive%\Downloads\"RD /S /Q %systemdrive%\install\DEL "%systemroot%\Blue Lace 16.bmp"DEL "%systemroot%\Coffee Bean.bmp"DEL "%systemroot%\FeatherTexture.bmp"DEL "%systemroot%\Gone Fishing.bmp"DEL "%systemroot%\Greenstone.bmp"DEL "%systemroot%\Prairie Wind.bmp"DEL "%systemroot%\Rhododendron.bmp"DEL "%systemroot%\River Sumida.bmp"DEL "%systemroot%\Santa Fe Stucco.bmp"DEL "%systemroot%\Soap Bubbles.bmp"DEL "%systemroot%\Zapotec.bmp"DEL "%systemroot%\Web\Wallpaper\Crystal.jpg"DEL "%systemroot%\Web\Wallpaper\Friend.jpg"DEL "%systemroot%\Web\Wallpaper\Home.jpg"DEL "%systemroot%\Web\Wallpaper\Moon flower.jpg"DEL "%systemroot%\Web\Wallpaper\Peace.jpg"DEL "%systemroot%\Web\Wallpaper\Power.jpg"DEL "%systemroot%\Web\Wallpaper\Ripple.jpg"DEL "%systemroot%\Web\Wallpaper\Vortec space.jpg"DEL "%systemroot%\Web\Wallpaper\Ascent.jpg"DEL "%systemroot%\Web\Wallpaper\Autumn.jpg"DEL "%systemroot%\Web\Wallpaper\Tulips.jpg"DEL "%systemroot%\Web\Wallpaper\Wind.jpg"EXIT
Marthax Posted May 9, 2004 Author Posted May 9, 2004 ok but how do i empty the recycle bin using a switch or command?
Marthax Posted May 9, 2004 Author Posted May 9, 2004 and another thing...does anyone know how to delete certain files inside a directory if i don't know what they are called but i want the folder to be emptied...like windows prefetch folder i want it to be emptied but i don't know what all the files are called...is there a way to delete them without knowing their name?
jrzycrim Posted May 9, 2004 Posted May 9, 2004 del /q %systemroot%\Prefetch\*.*The /q will do it quietly. *.* is a wildcard which will delete all files.Cheers,
Marthax Posted May 9, 2004 Author Posted May 9, 2004 now the only thing that is left is the recycle bin..i know i'm repeating myself but noone seems to have the answer for it..anyone who knows how to empty the recycle bin?
jrzycrim Posted May 9, 2004 Posted May 9, 2004 I've been fooling around with it but haven't got it to work perfectly. I'll definitely post a response if I get it to work.
WwTIPPYwW Posted May 9, 2004 Posted May 9, 2004 if you use DEL in DOS - I doesn't go to the recyling bin.Also - DIESEL - shutdown.exe -r -f -t 90 -c "Windows XP will now restart in 1 minute..."90 seconds is not 1 minute. I know you know that, but I'm pointing it out if you want to make them match....like I did.
WwTIPPYwW Posted May 9, 2004 Posted May 9, 2004 can you delete all things in %systemdrive%\recycled ?? or recylcer
diesel_98a Posted May 9, 2004 Posted May 9, 2004 actually i did not even notice but i will change it, thanks!!!!!could the recycle bin items be deleted by simply doing recycle bin\*.*?
jrzycrim Posted May 9, 2004 Posted May 9, 2004 In XP, you can delete the entire recycler directory. (rd /q/s c:\recycler, for example) It will be automatically recreated when you put something in the recycle bin. A minor problem is that the recycle bin on the desktop will show that it still contains items. As WwTIPPYwW pointed out, though, items deleted through the command prompt do not go to the recylce bin so the point is mute.Cheers.
diesel_98a Posted May 9, 2004 Posted May 9, 2004 kinda defeats the purpose of deleting the recycle bin. now say u have some stuff inside the recycle bin and then delete it, i suppose that comes back too? i wouldn't think so.
Marthax Posted May 10, 2004 Author Posted May 10, 2004 ok, thx guys for the help. I you find out something new then let me know.cheers
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