New Posts  All Forums:Forum Nav:

Simple batch file? - Page 2

post #11 of 14
Quote:
Originally Posted by DayzaStarr View Post
I was just wondering if making these lines, without having to go into the batch file each time with a different user and changing "user" would be possible. I know this isn't a long process but instead of going into the cmd and typing this all out to delete temp files just a simple click of a batch file would do it all for me?
Save this as a .bat

Code:
@echo off
for /d %%d in ("%userprofile%\\..\\*.*") do rd "%%d\\local settings\emp" /s /q
post #12 of 14
Thread Starter 
Quote:
Originally Posted by lordikon View Post
Download CCleaner, it will clean all of that out for you. No need to reinvent the wheel.
I use ccleaner but sometimes it can take a while to run through if the computer wasn't cleaned out for, well the life of the computer it would seem. So the guys showing me how they do things here at my new job just said do it manually sometimes, eh idk I've never felt the need to clear out temps but I'll go along with it.

Also, thank you to everyone who responded to this your assistance was much appreciated.
Dayz'd(0)
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 d0 (Batch:391A238) 3.8@1.19 vcore ASUS P6T DELUXE V2 Sapphire&Gigabyte 6950's Xfire (unlocked) OCZ Gold 6GB (3 x 2GB) DDR3 1600 8-8-8-24 
Hard DriveOptical DriveOSMonitor
Corsair C300 64GB Western Digital 1TB LG 22X DVD±R DVD Burner Windows 7 x64 Eyefinity - (3) 22" Acer Widescreen & 40" Sony ... 
PowerCase
CORSAIR 750TX Antec Nine Hundred 
  hide details  
Reply
Dayz'd(0)
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 d0 (Batch:391A238) 3.8@1.19 vcore ASUS P6T DELUXE V2 Sapphire&Gigabyte 6950's Xfire (unlocked) OCZ Gold 6GB (3 x 2GB) DDR3 1600 8-8-8-24 
Hard DriveOptical DriveOSMonitor
Corsair C300 64GB Western Digital 1TB LG 22X DVD±R DVD Burner Windows 7 x64 Eyefinity - (3) 22" Acer Widescreen & 40" Sony ... 
PowerCase
CORSAIR 750TX Antec Nine Hundred 
  hide details  
Reply
post #13 of 14
Thread Starter 
Following Alucard's script I've got this:

Quote:
@echo off
for /d %%d in ("%userprofile%\\..\\*.*") do rd "%%d\\local settings\emp" /s /q
for /d %%d in ("%userprofile%\\..\\*.*") do rd "%%d\\local settings\\Temporary Internet Files" /s /q
del C:\\Windows\\Temp\\*.*
It doesnt ask for a y/n after the first two strings but for the windows temp it does. Is there a way to get the temp files in WINDOWS dir to do an automated delete as well? Is that what the /s /q does?
Dayz'd(0)
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 d0 (Batch:391A238) 3.8@1.19 vcore ASUS P6T DELUXE V2 Sapphire&Gigabyte 6950's Xfire (unlocked) OCZ Gold 6GB (3 x 2GB) DDR3 1600 8-8-8-24 
Hard DriveOptical DriveOSMonitor
Corsair C300 64GB Western Digital 1TB LG 22X DVD±R DVD Burner Windows 7 x64 Eyefinity - (3) 22" Acer Widescreen & 40" Sony ... 
PowerCase
CORSAIR 750TX Antec Nine Hundred 
  hide details  
Reply
Dayz'd(0)
(13 items)
 
  
CPUMotherboardGraphicsRAM
i7 920 d0 (Batch:391A238) 3.8@1.19 vcore ASUS P6T DELUXE V2 Sapphire&Gigabyte 6950's Xfire (unlocked) OCZ Gold 6GB (3 x 2GB) DDR3 1600 8-8-8-24 
Hard DriveOptical DriveOSMonitor
Corsair C300 64GB Western Digital 1TB LG 22X DVD±R DVD Burner Windows 7 x64 Eyefinity - (3) 22" Acer Widescreen & 40" Sony ... 
PowerCase
CORSAIR 750TX Antec Nine Hundred 
  hide details  
Reply
post #14 of 14
Quote:
Originally Posted by DayzaStarr View Post
It doesnt ask for a y/n after the first two strings but for the windows temp it does. Is there a way to get the temp files in WINDOWS dir to do an automated delete as well? Is that what the /s /q does?
/S: Delete all files and subfolders in addition to the folder itself.

/Q: Quiet - do not display YN confirmation
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Coding and Programming