2 Replies Latest reply: May 15, 2014 10:16 AM by Scott Eshleman RSS

    File Not Found whne using batch Files

    maxf _

      We are using Monarch V11.8  and run batch files that execute projects.


      When the project cannot find the source file it is looking for the dialogue pop up box appears.


      When we click on the browse option two choices appear  “Local or Network file”,  and “Web file” (same as if you opened a project manually)


      When we click on “Local or Network file” a Windows Explorer dialogue box should appear.   It does when you open the project “manually’.  It does not occur however when done via a batch file.


      Has anyone else seen this problem and know of a fix?

        • File Not Found whne using batch Files
          Olly Bond

          Hello Max,


          I'm afraid I can't replicate this as my 11.8 is only licenced for "normal" use, not for batch/script automation.


          It sounds like you might be running a regular model against a filename that changes, so it might be worth considering upgrading to Datawatch DataPump/Automator/Server so that you could use wildcard filenames.


          If you are forced to run the automation on a desktop, then there are other experts here who might have creative solutions.


          Best wishes,



            • File Not Found whne using batch Files
              Scott Eshleman

              I can't test this to my satisfaction with Version 11 either but will comment nonetheless.


              When using 'simple' DOS batch files, I commonly built verifications into them that checked for the existence of  required files prior to the point where the  batch file executes the project.  For this, I used the "[B]IF EXIST[/B]" command.  If the files didn't exist, the batch file could prompt a number of options; with one of the options being to cancel the execution of the batch file altogether.


              2 other options available in a DOS batch file are:


              the CHOICE[/B] command can be used when the file required varies among a defined list of filenames.  In this context, these filenames would typically be presented to the user in the preceding lines of output displayed by the batch file.


              [B]CHOICE[/B] [[B]/C[/B][:]choices] [[B]/N[/B]] [[B]/S[/B]] [[B]/T[/B][:]c,nn]


              /C[:]choices Specifies allowable keys. Default is YN.

              /N           Does not display choices and ? at end of prompt string.

              /S           Treats choice keys as case sensitive.

              /T[:]c,nn    Defaults choice to c after  seconds.

              text         Prompts string to display.

              /CODE[INDENT]While the use of the CHOICE[/B] command (and its subsequent ERRORLEVEL[/B] response determinations) is appropriate in many cases and affords a desired level of 'user-proofing' the responses keyed by the user, I sense that the following option may be more to liking of some...[/INDENT]

              For many batch file generators desiring a generally more versatile or liberal response from the user, the SET[/B] command with a '[B]/P[/B]' command switch should satisfy that requirement.  It will prompt for user-keyed input (including typos) and assign it to a variable that can be used throughout the batch file.


              [B]SET /P /Bvariable=[promptString]


              if used, displays text as a queue to the user (optional)



              Please note: You may need to include commands in the batch file so as to  change the filesystem directory wherein the batch is looking for the  existing or prompted filename relative to the location from where the  batch file is executed.