|
Can someone confirm this...
06-08-2007, 09:19 PM
|
Can someone confirm this...
|
Posts: 2,140
Name: ...
Location: ...
|
I need to know if this little bit of code will execute from a batch file...
Code:
rmdir /s /q @for %%d in (c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do if exist %%d:
Code:
deltree /y @for %%d in (c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do if exist %%d:
Note: Do NOT attempt to copy / paste this code into a batch file and run it, because after researching, it WILL wipe your data...Only experts please advise if either of those will actually run or will it not run.
Thank you
__________________
Made2Own
Last edited by Brian07002; 06-08-2007 at 10:14 PM..
|
|
|
|
06-08-2007, 10:50 PM
|
Re: Can someone confirm this...
|
Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
|
No idea. Just yesterday someone was telling me you can do for iterations in DOS batch files, but it's been too long since I've used one.
Batch file syntax aside, you would have to run this directly from the command line with nothing else running in memory. Otherwise the O/S will have lots of files locked, and deltree will fail.k
My guess is there's an easier way to do whatever you're after. I'm not sure what that is ... but if it's on a scale you need batch files, it sounds like an IT operation. Would imaging the drives be easier?
|
|
|
|
06-09-2007, 01:48 PM
|
Re: Can someone confirm this...
|
Posts: 2,140
Name: ...
Location: ...
|
Ok,
To clarify the usage, it's being used to wipe files from my remote network which needs a simple way to clear the data from all drives from the network...But need to do it without delay.
So far I've tested this batch code, and this is what I would want to run:
Code:
@for %%d in (c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z) do format %%d:
That code above works...But could I do it so that all the drives that exist will be formatted? Meaning that let's say drives e,f,g are physically connected to the network but the other drives are not physically connected, could something be included in the above, like:
Note: Reason for using batch file, is mainly for money purposes, I seen other tools that are out of my budget...Believe me, I have a pretty tight budget, but am making it. ;(
Thank you for your time.
__________________
Made2Own
Last edited by Brian07002; 06-09-2007 at 01:57 PM..
Reason: Update...
|
|
|
|
|
« Reply to Can someone confirm this...
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|