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 6989 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.