Computer Hope
Microsoft => Microsoft DOS => Topic started by: tinmce on May 21, 2009, 04:25:01 PM
-
Hello! I'm trying to do a .bat file that formats my d drive... I tried these lines...
echo y | format d:\
format d:\ /y
format d:\
any of those didn't work, so now I'm requesting your help :)
I'm using Vista and I'm logged as a Administrator...
-
whats the error that your getting?
-
whats the error that your getting?
Nothing. When I run that bat I can see cmd popping up and disappearing immediately.
I think it has something to do with user rights.. When I tried to format d with cmd it said that I don't have rights to do that... Even when I am logged as a administrator... *censored* vista...
-
oh, try right clicking the batch file, and pressing run as admin.
im pretty sure it would work
and for better debugging of a batch file.
open cmd.exe > type the path of your batch file then it should say the error and resume back to the command prompt
so cmd > c:\path of file\file.bat
Syntax error: blah blah blah
c:\>
-
What's wrong with Right Click --> Format?
-
What's wrong with Right Click --> Format?
:o
well good point.
you know, now that you mention it, this is starting to sound pretty malicious ;D
but im sure he just wants to know what the problem is
-
but im sure he just wants to know what the problem is
You're new here, aren't you?
-
kind of wondered myself since its just a straight format driveletter:\
-
Well, the point was to create bat file that formats d drive.... I know how to format d drive.... But I wanted to create a bat file that does it...
oh, try right clicking the batch file, and pressing run as admin.
im pretty sure it would work
and for better debugging of a batch file.
open cmd.exe > type the path of your batch file then it should say the error and resume back to the command prompt
so cmd > c:\path of file\file.bat
Syntax error: blah blah blah
c:\>
I tried.
C:\Users\Admin\Desktop\zzz.bat
C:\Windows\system32>format d:
Tiedostojärjestelmän tyyppi on NTFS.
Kirjoita aseman D: nykyinen asemanimi
(means... File system is NTFS. Write D: drive's current drivename) ???
-
I think, if you understand what we were saying, is we what to know why....
-
exatly, why do it one way when your probably not going to use it again vs the easy way.
-
So noone knows how to do bat file that formats d drive?
-
So noone knows how to do bat file that formats d drive?
Many people know. No-one wants to tell you, because we are not sure why you want to know.
-
I want to know how to create a bat file that formats d drive when running... It should work when just double clicking the bat file
-
I want to know how to create a bat file that formats d drive when running... It should work when just double clicking the bat file
We keep asking you "Why?" and you keep failing to answer that question.
-
because I want to know how to do that kind of bat file. Does it really need a specific reason?? ??? I have also tried to do bat file that opens different programs at the same time... And it partially worked...
C:
C:\Windows\notepad (this actually works fine)
C:\Program Files\IObit\Advanced SystemCare 3\awc.exe
C:\Program Files\Lavalys\EVEREST Home Edition\everest.exe
but those last two didn't open... -.-
-
because I want to know how to do that kind of bat file. Does it really need a specific reason??
Yes. We are a responsible forum. A script that could format without user intervention is potentially disastrous and very few people need to do it. Such a script could be used for malicious purposes, by stupid prank playing idiots, and it is not really all that hard for you to work it out for yourself. Feel free to experiment on your own hardware.
-
aa now I got it :D hehe I didn't even think about that... :o well I don't even know how to disguise bat file so that someone would actually run it :D I just wanted to create something effective with bat file... Creating a bat file that opens programs sounds so booring :d but I see that I have to settle with that then...
So could you help me to finish that another bat that opens different programs... ? :)
-
C:\Windows\notepad (this actually works fine)
C:\Program Files\IObit\Advanced SystemCare 3\awc.exe
C:\Program Files\Lavalys\EVEREST Home Edition\everest.exe
but those last two didn't open
You need to enclose a path + filename in quote marks if it contains contains one or more spaces
-
okey. thank you, got it right now :) ;D
-
You want me to toss you in and tell you to swim?
-
You want me to toss you in and tell you to swim?
ehm.. wat
-
you have to learn the basic for before you move to the advanced.
-
You're new here, aren't you?
well. yes...besides the point.
Carbon said:
What's wrong with Right Click --> Format?
which is basicly easier. i know.
but he wants to know what is wrong with his script because he COULD just right click and format.
i didn't mean to sound obvious. im just telling carbon that he wants to find the problem instead of just getting over it
-
Insert Quote
Quote from: Dias de verano on Today at 10:46:30
You're new here, aren't you?
well. yes...besides the point.
“You must be new here.” is a "Slashdot meme", in other words, the height of wit and humour.
In Soviet Russia, the batch file writes you!
Incidentally, does this remind people of anyone?
'Junis' referencing the infamous story in which an Afghani named 'Junis' purportedly was back online via his Commodore computer. Used to describe doubt of authenticity of a posted claim, such as 'Junis, is that you?"