Go Back   Hardware Canucks > SOFTWARE > O/S's, Drivers & General Software

    
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old October 7, 2010, 03:38 PM
encorp's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2008
Location: Toronto
Posts: 3,425

My System Specs

Default Batch files.

I dunno if this is the best section for this, buuuut whatever.

It's been years since I touched a batch file. Anyone interested in helping me write one?

I want to empty out a folder every time I reboot. I've got a folder on a disk where chrome saves anything I specifically download (Not cache, cookies etc)

I want it to clear automatically for me. I can handle the syntax regarding folder/drive locations I just don't know what commands to use...


duuuur

Thanks!
__________________
DISCLAIMER: The views and opinions expressed in the immediately preceding post are those of encorp and do not reflect the views and/or opinions of family, friends, or anyone remotely associated with encorp unless explicitly stated. encorp does not make any warranty, express or implied, or assumes any liability or responsibility for the quality, factuality or use of information in the immediately preceding post.
Reply With Quote
  #2 (permalink)  
Old October 7, 2010, 03:46 PM
CMetaphor's Avatar
Quadfather
 
Join Date: May 2007
Location: Montreal, Canada
Posts: 4,999

My System Specs

Default

Oh man its been a while... but i might be able to get you going in the right direction, as I think it's fairly simple...

cd c:\<insert your path to folder with the files to be deleted>
del *.*

write that in notepad or similar, save as .bat and put in your startup folder. Done?
__________________
"Backed by common sense and physics!" -Squeetard
Opteron Server for Sale! http://www.hardwarecanucks.com/forum...ade-ideas.html
Reply With Quote
  #3 (permalink)  
Old October 7, 2010, 03:53 PM
encorp's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2008
Location: Toronto
Posts: 3,425

My System Specs

Default

Quote:
Originally Posted by CMetaphor View Post
Oh man its been a while... but i might be able to get you going in the right direction, as I think it's fairly simple...

cd c:\<insert your path to folder with the files to be deleted>
del *.*

write that in notepad or similar, save as .bat and put in your startup folder. Done?
God, wait.. it's that easy?

Haha those commands are so old school.. I really didn't think it'd be that simple..

Thanks!

If anyone else knows different; let me know!
__________________
DISCLAIMER: The views and opinions expressed in the immediately preceding post are those of encorp and do not reflect the views and/or opinions of family, friends, or anyone remotely associated with encorp unless explicitly stated. encorp does not make any warranty, express or implied, or assumes any liability or responsibility for the quality, factuality or use of information in the immediately preceding post.
Reply With Quote
  #4 (permalink)  
Old October 7, 2010, 04:08 PM
CMetaphor's Avatar
Quadfather
 
Join Date: May 2007
Location: Montreal, Canada
Posts: 4,999

My System Specs

Default

Quote:
Originally Posted by encorp View Post
God, wait.. it's that easy?

Haha those commands are so old school.. I really didn't think it'd be that simple..

Thanks!

If anyone else knows different; let me know!
No prob dude. you can always just try out the commands to a batch file one at a time by typing them in an ms-dos command windows too btw...
__________________
"Backed by common sense and physics!" -Squeetard
Opteron Server for Sale! http://www.hardwarecanucks.com/forum...ade-ideas.html
Reply With Quote
  #5 (permalink)  
Old October 7, 2010, 04:29 PM
encorp's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2008
Location: Toronto
Posts: 3,425

My System Specs

Default

The "are you sure" prompt comes up when I run it manually.. will that get in the way?

EDIT: Oddly enough, running it manually does NOT work. I put files in the folder and I can't delete them. I receive no errors or messages in cmd. It just goes through with it but the files are still there.


I know those commands work, I've used em billion times lol
__________________
DISCLAIMER: The views and opinions expressed in the immediately preceding post are those of encorp and do not reflect the views and/or opinions of family, friends, or anyone remotely associated with encorp unless explicitly stated. encorp does not make any warranty, express or implied, or assumes any liability or responsibility for the quality, factuality or use of information in the immediately preceding post.
Reply With Quote
  #6 (permalink)  
Old October 7, 2010, 04:41 PM
sswilson's Avatar
Moderator
F@H
 
Join Date: Dec 2006
Location: Moncton NB
Posts: 14,570

My System Specs

Default

Can you delete the contents of the folder from within windows?
__________________
MSI Z87I Gaming AC / i5 4670K / 2X 4G Gskill 1866 DDR3 / XFX XTR 750 / EVGA GTX 680 SC+ 2GB / Intel DC S3700 200G / random 160G Sata HDD
Inwin 904 / Swiftech MCP655-b / Alphacool NexXxos XT45 120 Rad / 2X Scythe GT AP-15 / EK Supreme HF / Dell UltraSharp U2412M

Asrock AM1H-ITX / AM1 Athlon 5350 / 2X4G Gskill PC3-14900 / Intel 6235 Wi-Fi / 90W Targus Power Brick / 320G Seagate Momentus / Mini-Box M350 / 1X 22" Dell IPS / 1X 22" HP
Reply With Quote
  #7 (permalink)  
Old October 7, 2010, 04:44 PM
encorp's Avatar
Hall Of Fame
F@H
 
Join Date: Apr 2008
Location: Toronto
Posts: 3,425

My System Specs

Default

Quote:
Originally Posted by sswilson View Post
Can you delete the contents of the folder from within windows?
Yep!

I even ran cmd in admin mode.

It didn't do anything to the files in the folder lol.
__________________
DISCLAIMER: The views and opinions expressed in the immediately preceding post are those of encorp and do not reflect the views and/or opinions of family, friends, or anyone remotely associated with encorp unless explicitly stated. encorp does not make any warranty, express or implied, or assumes any liability or responsibility for the quality, factuality or use of information in the immediately preceding post.
Reply With Quote
  #8 (permalink)  
Old October 7, 2010, 04:49 PM
sswilson's Avatar
Moderator
F@H
 
Join Date: Dec 2006
Location: Moncton NB
Posts: 14,570

My System Specs

Default

Heh... gotta be an authority thing... I'm not currently on a win7 machine.... does the /? switch for del at the command line offer a switch for "do it no matter what!!!" ?
__________________
MSI Z87I Gaming AC / i5 4670K / 2X 4G Gskill 1866 DDR3 / XFX XTR 750 / EVGA GTX 680 SC+ 2GB / Intel DC S3700 200G / random 160G Sata HDD
Inwin 904 / Swiftech MCP655-b / Alphacool NexXxos XT45 120 Rad / 2X Scythe GT AP-15 / EK Supreme HF / Dell UltraSharp U2412M

Asrock AM1H-ITX / AM1 Athlon 5350 / 2X4G Gskill PC3-14900 / Intel 6235 Wi-Fi / 90W Targus Power Brick / 320G Seagate Momentus / Mini-Box M350 / 1X 22" Dell IPS / 1X 22" HP
Reply With Quote
  #9 (permalink)  
Old October 7, 2010, 05:04 PM
MVP
 
Join Date: Mar 2010
Location: Ottawa
Posts: 447
Default

Try: "del /q /f /s c:\path\to\your\dir\."

(excluding the quotes of course)
Reply With Quote
  #10 (permalink)  
Old October 7, 2010, 05:04 PM
sswilson's Avatar
Moderator
F@H
 
Join Date: Dec 2006
Location: Moncton NB
Posts: 14,570

My System Specs

Default

under XP it's /f (force deletion of read only) /s (subdirectories) /q (quiet no prompt)......

Be very careful of how you write it if you include the /q though.... Not sure about win7, but XP defaults to the documents and settings\username so if the CD doesn't work that plus all of the subdirectories is what will be deleted without a prompt..... (I'd test it out without the /Q first..... ;)
__________________
MSI Z87I Gaming AC / i5 4670K / 2X 4G Gskill 1866 DDR3 / XFX XTR 750 / EVGA GTX 680 SC+ 2GB / Intel DC S3700 200G / random 160G Sata HDD
Inwin 904 / Swiftech MCP655-b / Alphacool NexXxos XT45 120 Rad / 2X Scythe GT AP-15 / EK Supreme HF / Dell UltraSharp U2412M

Asrock AM1H-ITX / AM1 Athlon 5350 / 2X4G Gskill PC3-14900 / Intel 6235 Wi-Fi / 90W Targus Power Brick / 320G Seagate Momentus / Mini-Box M350 / 1X 22" Dell IPS / 1X 22" HP
Reply With Quote
Reply


Thread Tools
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Overclockin i7 930 Batch #3942A819 Closed Note Overclocking, Tweaking and Benchmarking 17 September 3, 2010 01:25 PM
Anyone had this i7 930 batch yet? Jelah Overclocking, Tweaking and Benchmarking 13 August 9, 2010 05:17 PM
Core I7 Batch# Saterial CPU's and Motherboards 4 July 3, 2009 09:52 AM
batch numbers Rapid-X Overclocking, Tweaking and Benchmarking 8 May 12, 2008 10:29 PM
Intel Batch Codes enaberif CPU's and Motherboards 2 February 14, 2008 10:56 AM