Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: .bat that formats d drive  (Read 6859 times)

0 Members and 1 Guest are viewing this topic.

tinmce

    Topic Starter


    Greenhorn

    .bat that formats d drive
    « 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...

    BatchFileBasics



      Hopeful

      Thanked: 18
      Re: .bat that formats d drive
      « Reply #1 on: May 21, 2009, 05:27:21 PM »
      whats the error that your getting?
      When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

      tinmce

        Topic Starter


        Greenhorn

        Re: .bat that formats d drive
        « Reply #2 on: May 21, 2009, 11:04:29 PM »
        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...

        BatchFileBasics



          Hopeful

          Thanked: 18
          Re: .bat that formats d drive
          « Reply #3 on: May 21, 2009, 11:06:39 PM »
          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:\>
          When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

          Carbon Dudeoxide

          • Global Moderator

          • Mastermind
          • Thanked: 169
            • Yes
            • Yes
            • Yes
          • Certifications: List
          • Experience: Guru
          • OS: Mac OS
          Re: .bat that formats d drive
          « Reply #4 on: May 21, 2009, 11:22:25 PM »
          What's wrong with Right Click --> Format?

          BatchFileBasics



            Hopeful

            Thanked: 18
            Re: .bat that formats d drive
            « Reply #5 on: May 21, 2009, 11:32:22 PM »
            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
            When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

            Dias de verano

            • Guest
            Re: .bat that formats d drive
            « Reply #6 on: May 22, 2009, 03:46:30 AM »
            but im sure he just wants to know what the problem is

            You're new here, aren't you?

            squall_01



              Prodigy

              Thanked: 80
              Re: .bat that formats d drive
              « Reply #7 on: May 22, 2009, 05:38:37 AM »
              kind of wondered myself since its just a straight format driveletter:\
              Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

              If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

              tinmce

                Topic Starter


                Greenhorn

                Re: .bat that formats d drive
                « Reply #8 on: May 22, 2009, 08:13:20 AM »
                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) ???


                « Last Edit: May 22, 2009, 08:28:52 AM by tinmce »

                Carbon Dudeoxide

                • Global Moderator

                • Mastermind
                • Thanked: 169
                  • Yes
                  • Yes
                  • Yes
                • Certifications: List
                • Experience: Guru
                • OS: Mac OS
                Re: .bat that formats d drive
                « Reply #9 on: May 22, 2009, 08:22:45 AM »
                I think, if you understand what we were saying, is we what to know why....

                squall_01



                  Prodigy

                  Thanked: 80
                  Re: .bat that formats d drive
                  « Reply #10 on: May 22, 2009, 11:57:46 AM »
                  exatly, why do it one way when your probably not going to use it again vs the easy way.
                  Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                  If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                  tinmce

                    Topic Starter


                    Greenhorn

                    Re: .bat that formats d drive
                    « Reply #11 on: May 22, 2009, 12:33:00 PM »
                    So noone knows how to do bat file that formats d drive?

                    Dias de verano

                    • Guest
                    Re: .bat that formats d drive
                    « Reply #12 on: May 22, 2009, 12:57:55 PM »
                    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.


                    tinmce

                      Topic Starter


                      Greenhorn

                      Re: .bat that formats d drive
                      « Reply #13 on: May 22, 2009, 01:07:24 PM »
                      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

                      Dias de verano

                      • Guest
                      Re: .bat that formats d drive
                      « Reply #14 on: May 22, 2009, 01:10:59 PM »
                      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.

                      tinmce

                        Topic Starter


                        Greenhorn

                        Re: .bat that formats d drive
                        « Reply #15 on: May 22, 2009, 01:40:09 PM »
                        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... -.-

                        Dias de verano

                        • Guest
                        Re: .bat that formats d drive
                        « Reply #16 on: May 22, 2009, 01:53:51 PM »
                        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.

                        « Last Edit: May 22, 2009, 02:04:06 PM by Dias de verano »

                        tinmce

                          Topic Starter


                          Greenhorn

                          Re: .bat that formats d drive
                          « Reply #17 on: May 22, 2009, 02:19:00 PM »
                          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... ? :)

                          Dias de verano

                          • Guest
                          Re: .bat that formats d drive
                          « Reply #18 on: May 22, 2009, 02:53:36 PM »
                          Quote
                          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

                          Quote
                          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

                          tinmce

                            Topic Starter


                            Greenhorn

                            Re: .bat that formats d drive
                            « Reply #19 on: May 22, 2009, 03:29:16 PM »
                            okey. thank you, got it right now :) ;D

                            squall_01



                              Prodigy

                              Thanked: 80
                              Re: .bat that formats d drive
                              « Reply #20 on: May 22, 2009, 03:57:07 PM »
                              You want me to toss you in and tell you to swim?
                              Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                              If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                              tinmce

                                Topic Starter


                                Greenhorn

                                Re: .bat that formats d drive
                                « Reply #21 on: May 22, 2009, 04:06:31 PM »
                                You want me to toss you in and tell you to swim?

                                ehm.. wat

                                squall_01



                                  Prodigy

                                  Thanked: 80
                                  Re: .bat that formats d drive
                                  « Reply #22 on: May 22, 2009, 04:41:40 PM »
                                  you have to learn the basic for before you move to the advanced.
                                  Windows 7 RC Tester.  Working on it.  Your monitor says etchasketch on the side!

                                  If I fall who is there to pick me up now.  I stand alone but I stand as the gaurdian for whom I wish to protect.  The sound of my blade utters my name as you fall.  For I shall not move.  For those that forsake the very people are wosres

                                  BatchFileBasics



                                    Hopeful

                                    Thanked: 18
                                    Re: .bat that formats d drive
                                    « Reply #23 on: May 22, 2009, 04:47:56 PM »
                                    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
                                    When the power of love overcomes the love of power the world will know peace - Jimi Hendrix.

                                    Dias de verano

                                    • Guest
                                    Re: .bat that formats d drive
                                    « Reply #24 on: May 22, 2009, 04:59:56 PM »
                                    Quote
                                    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?

                                    Quote
                                    '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?"