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

Author Topic: batch file to run program in another partition  (Read 32669 times)

0 Members and 1 Guest are viewing this topic.

Salmon Trout

  • Guest
Re: batch file to run program in another partition
« Reply #15 on: January 12, 2012, 10:24:21 AM »
DOS used to have a PATH file but XP doesn't as far as I know.

It's not a file, it's an environment variable, and XP does have it, as does every version of Windows. But you have spotted the problem, I believe.

OP needs to type either

PATH (then press Enter)

or

echo %path% (then press Enter)

and let us know the results, because if CD comes up as an unknown commmand then his %Path% variable is probably screwed up.


« Last Edit: January 12, 2012, 10:34:48 AM by Salmon Trout »

Raven19528



    Hopeful
  • Thanked: 30
    • Computer: Specs
    • Experience: Experienced
    • OS: Windows 7
    Re: batch file to run program in another partition
    « Reply #16 on: January 12, 2012, 10:39:29 AM »
    DOS used to have a PATH file but XP doesn't as far as I know.

    Have you tried "path /?", because this is what I get from it:

    Code: [Select]
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

    C:\Users\Raven19528>path /?
    Displays or sets a search path for executable files.

    PATH [[drive:]path[;...][;%PATH%]
    PATH ;

    Type PATH ; to clear all search-path settings and direct cmd.exe to search
    only in the current directory.
    Type PATH without parameters to display the current path.
    Including %PATH% in the new path setting causes the old path to be
    appended to the new setting.

    C:\Users\Raven19528>

    So it is definitely possible to set the path. The problem doesn't seem to be the path or anything like that though, as the batch file was essentially copying itself into the log file instead of outputing only certain lines and errors to the log files. Path variables wouldn't have anything to do with the output. I most often see this kind of problem being user error, but since I described those steps in fairly good detail, I suspect that there is something much more involved that is messing things up. Of course, if no commands are able to be found in the path environment, then everything should produce a "Bad command or file name" error and that should be what we see in the error log.
    "All things that are
    Are with more spirit chased than enjoy'd" -Shakespeare

    rogernh

      Topic Starter


      Rookie

      • Experience: Beginner
      • OS: Unknown
      Re: batch file to run program in another partition
      « Reply #17 on: January 12, 2012, 10:48:04 AM »
      Entering path in the run window gets a "file not found" error.

      Entering echo %path% gets "echo not found" error

      I got around the problem by putting sts.exe on the C: drive. It can find the other drive from there. The problem seems to be that it can't find its configuration files if they're on the E: partition

      Roger

      rogernh

        Topic Starter


        Rookie

        • Experience: Beginner
        • OS: Unknown
        Re: batch file to run program in another partition
        « Reply #18 on: January 12, 2012, 11:03:43 AM »
        Correction; I was doing this wrong. You must type cmd in the run window to get the command line window.

        Entering path there gives the response desired as does the echo %path% command. And of course sts.exe was not in the path.

        I think it's solved.

        Roger

        Salmon Trout

        • Guest
        Re: batch file to run program in another partition
        « Reply #19 on: January 12, 2012, 11:22:36 AM »
        Entering path in the run window gets a "file not found" error.

        Entering echo %path% gets "echo not found" error


        This is XP, right? Go to Control Panel - System - Advanced, click the "Environment Variables" button, and see what is showing in the lower pane (titled "System Variables") for the Path variable. The default value for this is:

        Code: [Select]
        %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
        There may be other values appended or prepended, but you should see at least the above folder paths.

        If it is empty then click Edit and paste the above in and click OK repeatedly to get right out back to Control Panel and then reboot.

        If it is not empty click Edit and highlight the whole string and copy and paste it here.




        Salmon Trout

        • Guest
        Re: batch file to run program in another partition
        « Reply #20 on: January 12, 2012, 11:24:03 AM »
        Correction; I was doing this wrong. You must type cmd in the run window to get the command line window.

        Entering path there gives the response desired as does the echo %path% command. And of course sts.exe was not in the path.

        I think it's solved.

        Roger

        The path variable is a list of folders, separated by semicolons, so no exe file is going to be listed in it. Did you mean the folder in which sts.exe is located?


        rogernh

          Topic Starter


          Rookie

          • Experience: Beginner
          • OS: Unknown
          Re: batch file to run program in another partition
          « Reply #21 on: January 12, 2012, 11:48:02 AM »
          Yes.

          I haven't used the path statement for 25 years.

          Roger

          Salmon Trout

          • Guest
          Re: batch file to run program in another partition
          « Reply #22 on: January 12, 2012, 11:52:20 AM »
          I haven't used the path statement for 25 years.

          Then it's time you brushed up a bit...



          patio

          • Moderator


          • Genius
          • Maud' Dib
          • Thanked: 1769
            • Yes
          • Experience: Beginner
          • OS: Windows 7
          Re: batch file to run program in another partition
          « Reply #23 on: January 12, 2012, 12:17:32 PM »
          In a nutshell all locations required to run the app need to exist in the Path...then adjust the .bat file accordingly...
          " Anyone who goes to a psychiatrist should have his head examined. "

          rogernh

            Topic Starter


            Rookie

            • Experience: Beginner
            • OS: Unknown
            Re: batch file to run program in another partition
            « Reply #24 on: January 12, 2012, 08:06:16 PM »
            I thought it was fixed once I found the PATH and added the sts.exe folder.

            But NOOOOO!

            Not only that, the program to set operating variables work but have no effect on sts itself.

            I ran Avast! but found no viruses.

            I think it's haunted!

            Roger

            rogernh

              Topic Starter


              Rookie

              • Experience: Beginner
              • OS: Unknown
              Re: batch file to run program in another partition
              « Reply #25 on: January 13, 2012, 11:42:49 AM »
              Solved at last!

              The problem was not in dos or the path. It was in sts itself. It seems there is a 600 file limit to sts and my C: drive has a LOT more files than that.

              Sts couldn't find it's config file. Once I moved the whole folder to another, less crowded, partition, all is well.

              Thanks for trying to help. Sorry I misled you.

              Roger


              Salmon Trout

              • Guest
              Re: batch file to run program in another partition
              « Reply #26 on: January 13, 2012, 11:55:28 AM »
              Stereo Shell was a Midnight Commander clone, I thought it became obsolete (=was abandoned) around about 1989 because it crashed with a divide-by-zero error on any CPU later than the 80386. It sounds like it works after a fashion in a 16 bit virtual machine on Win32 though. I guess it might be fun to run old software, but computers and operating systems have moved on a bit in the last quarter century.


              Squashman



                Specialist
              • Thanked: 134
              • Experience: Experienced
              • OS: Other
              Re: batch file to run program in another partition
              « Reply #27 on: January 13, 2012, 12:47:46 PM »
              I would think there is a lot better File Managers today than an old version of Stereo Shell.

              rogernh

                Topic Starter


                Rookie

                • Experience: Beginner
                • OS: Unknown
                Re: batch file to run program in another partition
                « Reply #28 on: January 13, 2012, 12:52:42 PM »
                It was abandoned back then but not because it crashed anything.

                I've used it on all my computers because it works better than anything else I could find.

                Windows drag and drop is much less convenient (to me) than sts's method of keypresses.

                Roger

                patio

                • Moderator


                • Genius
                • Maud' Dib
                • Thanked: 1769
                  • Yes
                • Experience: Beginner
                • OS: Windows 7
                Re: batch file to run program in another partition
                « Reply #29 on: January 13, 2012, 01:04:30 PM »
                XTreeGold...or as Salmon mentioned Midnight Commander...
                " Anyone who goes to a psychiatrist should have his head examined. "