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

    
Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old October 7, 2010, 05:07 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 Desiato View Post
Try: del /q /f /s c:\path\to\your\dir\.
Quote:
Originally Posted by sswilson View Post
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..... ;)
Awesome.. thanks..

I'm testing it all manually so I should be safe.. plus all my default folders in Win 7 are libraries so you can't actually delete them.

Before you mention it though; this folder I'm working with is not a library or junction hahaha

Just a folder I right clicked and made.


EDIT: It appears that the change directory command is not working, I receive no errors but it does not actually change directories.
__________________
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
  #12 (permalink)  
Old October 7, 2010, 05:09 PM
MVP
 
Join Date: Mar 2010
Location: Ottawa
Posts: 447
Default

Quote:
Originally Posted by sswilson View Post
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..... ;)
cd is redundant, include the full path in the command.
Reply With Quote
  #13 (permalink)  
Old October 7, 2010, 05:12 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 Desiato View Post
Try: "del /q /f /s c:\path\to\your\dir\."

(excluding the quotes of course)
This says System cannot find the file specified. I also tried *.* instead of . at the end. No quotes of course.
__________________
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
  #14 (permalink)  
Old October 7, 2010, 05:15 PM
Top Prospect
 
Join Date: Apr 2010
Location: Vancouver
Posts: 242
Default

If the path contains spaces, e.g., %userprofile%\my music, you have to enclose it in quotes:

del "%userprofile%\my music\*.*" /q /f /s
__________________
iK
Reply With Quote
  #15 (permalink)  
Old October 7, 2010, 05:16 PM
sswilson's Avatar
Moderator
F@H
 
Join Date: Dec 2006
Location: Moncton NB
Posts: 14,468

My System Specs

Default

Under XP it's the del command it can't find from the default command path (hence why I used the CD to switch to my test folder when I wrote mine... ;) ).
__________________
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
  #16 (permalink)  
Old October 7, 2010, 05:30 PM
MVP
 
Join Date: Mar 2010
Location: Ottawa
Posts: 447
Default

as dcc said, the folder either has a space in it or you entered the path incorrectly.

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

step by step from admin shell:

copy con: delfiles.cmd <enter>
del /q /f /s "c:\path\to\your\download dir\."
<press F6><enter>

I even tested it.

Quote:
Originally Posted by sswilson View Post
Under XP it's the del command it can't find from the default command path (hence why I used the CD to switch to my test folder when I wrote mine... ;) ).
I don't have an xp system in front of me, but I'm pretty sure I've specified the full path with the del command in batch files since dos 4.01.
Reply With Quote
  #17 (permalink)  
Old October 7, 2010, 05:41 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 Desiato View Post
as dcc said, the folder either has a space in it or you entered the path incorrectly.

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

step by step from admin shell:

copy con: delfiles.cmd <enter>
del /q /f /s "c:\path\to\your\download dir\."
<press F6><enter>

I even tested it.



I don't have an xp system in front of me, but I'm pretty sure I've specified the full path with the del command in batch files since dos 4.01.

Ahh Ok! Thanks! It does in fact have a space in it.

I'll try this out!


Edit: del /q /f /s "E:\Chrome\Chrome Downloads\." Works perfectly!

Now I gather I just stick the batch somewhere and have it run on start up, correct?
__________________
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.

Last edited by encorp; October 7, 2010 at 06:03 PM.
Reply With Quote
  #18 (permalink)  
Old October 7, 2010, 10:22 PM
grinder's Avatar
Allstar
F@H
 
Join Date: Mar 2007
Posts: 821

My System Specs

Default

yeah... i'd dump a short-cut to your batch file into the startup folder of your start menu... that'll do it.
__________________
Phenom II 945 :: ASUS M4A78-E (780G) :: BFG 285GTX :: 4GB Mushkin DDR2 (5-4-4-12) :: Creative Xi-Fi :: Seagate 500 gig 7200.12 (better than WD BLACK!!!!!) :: Samsung 2493HM
Reply With Quote
  #19 (permalink)  
Old October 7, 2010, 10:41 PM
sswilson's Avatar
Moderator
F@H
 
Join Date: Dec 2006
Location: Moncton NB
Posts: 14,468

My System Specs

Default

Quote:
copy con: delfiles.cmd <enter>
what is the purpose of this line?
__________________
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
  #20 (permalink)  
Old October 7, 2010, 10:53 PM
grinder's Avatar
Allstar
F@H
 
Join Date: Mar 2007
Posts: 821

My System Specs

Default

Quote:
Originally Posted by sswilson View Post
what is the purpose of this line?
old school DOS

copies the keystrokes from the console (keyboard) directly into the file-name showed after the COPY CON command.

finish with a <ctrl> <z> and it closes the file.
__________________
Phenom II 945 :: ASUS M4A78-E (780G) :: BFG 285GTX :: 4GB Mushkin DDR2 (5-4-4-12) :: Creative Xi-Fi :: Seagate 500 gig 7200.12 (better than WD BLACK!!!!!) :: Samsung 2493HM
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