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

Author Topic: bat file error issue with programs  (Read 11872 times)

0 Members and 1 Guest are viewing this topic.

squall_01

    Topic Starter


    Prodigy

    Thanked: 80
    bat file error issue with programs
    « on: March 24, 2009, 11:43:35 AM »
    i want a bat to run defrag as part of the whole bat its self.  The thing is I have it as

    echo off
    disk defrag

    exit

    Is it cause it dont see the path or is it something else.
    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

    Dias de verano

    • Guest
    Re: bat file error issue with programs
    « Reply #1 on: March 24, 2009, 11:44:42 AM »
    What is your defrag program called? Where is it located? What OS are you using?

    squall_01

      Topic Starter


      Prodigy

      Thanked: 80
      Re: bat file error issue with programs
      « Reply #2 on: March 24, 2009, 11:45:22 AM »
      the disk defrag in windows xp
      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

      Dias de verano

      • Guest
      Re: bat file error issue with programs
      « Reply #3 on: March 24, 2009, 11:48:53 AM »
      Here ya go

      Code: [Select]
      C:\>defrag -?
      Usage:
      defrag <volume> [-a] [-f] [-v] [-?]
        volume  drive letter or mount point (d: or d:\vol\mountpoint)
        -a      Analyze only
        -f      Force defragmentation even if free space is low
        -v      Verbose output
        -?      Display this help text

      squall_01

        Topic Starter


        Prodigy

        Thanked: 80
        Re: bat file error issue with programs
        « Reply #4 on: March 25, 2009, 11:28:42 AM »
        saing not reconized as an internal external command.  I put it as C:\>defrag -? to see if it would work before I added switches.  It had made a file called defrag on A: however
        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

        Dias de verano

        • Guest
        Re: bat file error issue with programs
        « Reply #5 on: March 25, 2009, 12:11:50 PM »
        1. post the exact batch file you used.

        2. What happens if you type PATH at the command prompt?

        3. Try C:\Windows\Defrag.exe


        squall_01

          Topic Starter


          Prodigy

          Thanked: 80
          Re: bat file error issue with programs
          « Reply #6 on: March 25, 2009, 12:20:19 PM »
          here's what is in the bat file simple

          echo off

          C:\Windows\Defrag.exe


          exit

          I cant figure out why its not going tried a combo of things.  I called it scanner.bat I'm not running it from cmd.  I tried even putting in a start thinking that would work
          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

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: bat file error issue with programs
          « Reply #7 on: March 25, 2009, 12:22:10 PM »
          works for me.

          What OS? I'd say XP based on your specs but we're all aware how often you neglect to specify the machine your running on...
          I was trying to dereference Null Pointers before it was cool.

          Dias de verano

          • Guest
          Re: bat file error issue with programs
          « Reply #8 on: March 25, 2009, 12:23:20 PM »
          squall, why didn't you answer my other 2 questions?


          Dias de verano

          • Guest
          Re: bat file error issue with programs
          « Reply #9 on: March 25, 2009, 12:24:54 PM »
          works for me.

          What OS? I'd say XP based on your specs but we're all aware how often you neglect to specify the machine your running on...

          I expect he's running Sun Windows Ubuntu on a Kenwood DVD player.

          squall_01

            Topic Starter


            Prodigy

            Thanked: 80
            Re: bat file error issue with programs
            « Reply #10 on: March 25, 2009, 12:25:47 PM »
            oh the other one sorry I havent tried that yet.  But I'm not useing one of my machines but the path should still be the same right>
            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

            BC_Programmer


              Mastermind
            • Typing is no substitute for thinking.
            • Thanked: 1140
              • Yes
              • Yes
              • BC-Programming.com
            • Certifications: List
            • Computer: Specs
            • Experience: Beginner
            • OS: Windows 11
            Re: bat file error issue with programs
            « Reply #11 on: March 25, 2009, 12:26:33 PM »
            it's quite simple, it's far easier to answer one question and trail off about other things that have been tried that likely will only make it worse.

            I expect he's running Sun Windows Ubuntu on a Kenwood DVD player.


            or on a Dell Compaq Emachine.


            oh the other one sorry I havent tried that yet.  But I'm not useing one of my machines but the path should still be the same right>



            No don't worry about, you know, answering the questions or anything. God knows we're just trying to make conversation.
            I was trying to dereference Null Pointers before it was cool.

            squall_01

              Topic Starter


              Prodigy

              Thanked: 80
              Re: bat file error issue with programs
              « Reply #12 on: March 25, 2009, 12:28:53 PM »
              i dont know i did it this way tooo

              echo off

              C:\Windows\Defrag.exe

              path=C:\Windows\Defrag.exe

              exit
              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

              Dias de verano

              • Guest
              Re: bat file error issue with programs
              « Reply #13 on: March 25, 2009, 12:31:41 PM »
              OK, Squall, please try both of these before posting back.

              1. Type PATH at the prompt, and copy and paste what you get. Something is wrong with your %path% variable. You are going to find plenty of other commands that do not work.

              2. Type C:\Windows\system32\defrag.exe and press ENTER.

              If you don't do both these things, I am out of here.





              Dias de verano

              • Guest
              Re: bat file error issue with programs
              « Reply #14 on: March 25, 2009, 12:34:51 PM »
              I'm not useing one of my machines but the path should still be the same right>


               ::)