<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can JMP call a DOS Exe in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/707#M707</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would also like to point out the use of \!N in dghidoni's example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compare:&lt;/P&gt;&lt;P&gt;SaveTextFile( "C:\Temp\cmddir.bat", "echo \!"directory list\!"\!N&lt;/P&gt;&lt;P&gt;dir\!N&lt;/P&gt;&lt;P&gt;pause\!N", mode("replace")) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;SaveTextFile( "C:\Temp\cmddir.bat", "echo \!"directory list\!"&lt;/P&gt;&lt;P&gt;dir&lt;/P&gt;&lt;P&gt;pause", mode("replace")) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first one (with \!N) works, the second one doesn't. Your text editor may not display the difference. But if you run cmd.exe and then type:&lt;/P&gt;&lt;P&gt;cd c:\temp&lt;/P&gt;&lt;P&gt;type cmddir.bat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will see the difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2013 23:36:25 GMT</pubDate>
    <dc:creator>blackeneth</dc:creator>
    <dc:date>2013-05-22T23:36:25Z</dc:date>
    <item>
      <title>Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/689#M689</link>
      <description>by dos exe I just mean a standard windows/dos command line app that would run in a xp command window.</description>
      <pubDate>Fri, 28 Aug 2009 02:26:53 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/689#M689</guid>
      <dc:creator />
      <dc:date>2009-08-28T02:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/690#M690</link>
      <description>After a quick google search I couldn't find anything for you. I don't remember seeing anything like that in the scripting guide either. What are you trying to do, maybe there's more than one way to do it.</description>
      <pubDate>Fri, 28 Aug 2009 15:40:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/690#M690</guid>
      <dc:creator />
      <dc:date>2009-08-28T15:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/691#M691</link>
      <description>If you also have SAS, you can write a JSL script that connects to SAS and then you can run DOS commands using the X command.&lt;BR /&gt;&lt;BR /&gt;1) Connect to SAS using File-&amp;gt;SAS-&amp;gt;Server Connections&lt;BR /&gt;2) Write a JSL script:&lt;BR /&gt;&lt;BR /&gt;------------&lt;BR /&gt;conn = CurrentSASConnection();&lt;BR /&gt;&lt;BR /&gt;code = EvalInsert(&lt;BR /&gt;"\[&lt;BR /&gt;X '"C:\Program Files\Microsoft\Office12\EXCEL.EXE"'&lt;BR /&gt;\]");&lt;BR /&gt;&lt;BR /&gt;SAS Submit(code);&lt;BR /&gt;---------------------&lt;BR /&gt;&lt;BR /&gt;That would open up Excel using a DOS command through running SAS in the background.</description>
      <pubDate>Fri, 28 Aug 2009 17:33:36 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/691#M691</guid>
      <dc:creator />
      <dc:date>2009-08-28T17:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/692#M692</link>
      <description>Just found this out today.  The "web" command can run command line items:&lt;BR /&gt;e.g.&lt;BR /&gt;web("bob.exe");&lt;BR /&gt;&lt;BR /&gt;I just tried it with a perl script and it worked, too.</description>
      <pubDate>Tue, 23 Feb 2010 22:04:12 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/692#M692</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-23T22:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/693#M693</link>
      <description>Great find! I tried with an Applescript app and it worked perfectly. That opens up a range of possibilities.&lt;BR /&gt;&lt;BR /&gt;However, the path must be in URL-style, like web("file:///Applications/JMPtest.scpt"), at least on the Mac.</description>
      <pubDate>Tue, 23 Feb 2010 23:46:32 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/693#M693</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2010-02-23T23:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/694#M694</link>
      <description>On Windows I actually entered the directory like: web("c:\blah\blah.exe").  Not sure if it makes a difference, but I'm using JMP 8.</description>
      <pubDate>Wed, 24 Feb 2010 00:02:44 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/694#M694</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-02-24T00:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/695#M695</link>
      <description>I am also using JMP 8. Probably an OS thing, reflecting differences in how paths can be entered in a browser.</description>
      <pubDate>Wed, 24 Feb 2010 00:25:24 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/695#M695</guid>
      <dc:creator>ms</dc:creator>
      <dc:date>2010-02-24T00:25:24Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/696#M696</link>
      <description>Actually, a more direct way to call any .exe file is via the Open("/path/to/my/app.exe") statement.  Normally JMP expects a JMP, .txt, or .xls Excel file to open up within JMP.  But if it encounters a unrecognized file type in the Open() statement (such as .bat, .exe, or .gif) then it defers execution to the operating system using default file type associations. &lt;BR /&gt;&lt;BR /&gt;For example, if you specify a path to your .gif or .bmp image file, the image will be opened up (externally of JMP) using your default image viewer.  A .bat file will be executed from a DOS shell (you will probably see a quick flash and disappearance of the black DOS shell window).&lt;BR /&gt;&lt;BR /&gt;So you can write a .bat file to execute any DOS command, and call the .bat file from your JSL script.</description>
      <pubDate>Fri, 26 Feb 2010 18:51:13 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/696#M696</guid>
      <dc:creator />
      <dc:date>2010-02-26T18:51:13Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/697#M697</link>
      <description>I'm running JMP 8 from Windows, and am tantalizingly close to making the above work for me, but I can't quite get there.  I have a folder on my C: drive called "mydir" which contains a Windows Metafile called "image.wmf", a small text file called "aaa.txt" and a DOS batch file called "filecopy.bat" which contains the one-line DOS command "copy aaa.txt bbb.txt" (without the quotes).  I try running each of the following commands from JMP:&lt;BR /&gt;&lt;BR /&gt;open("\mydir\image.wmf");&lt;BR /&gt;open("\mydir\filecopy.bat");&lt;BR /&gt;&lt;BR /&gt;The first of the above commands works exactly as the above reply describes (i.e. it opens the default viewer externally of JMP and displays the image), so it's evidently looking in the right place for the file to open, but the second one simply generates the following error messages:&lt;BR /&gt;&lt;BR /&gt;&amp;lt;&amp;lt;&lt;BR /&gt;Unable to open file. Unknown or ambiguous data source. &lt;BR /&gt;Tried to open: \mydir\filecopy.bat&lt;BR /&gt;Cannot open table in access or evaluation of 'Open' , Open( "\mydir\filecopy.bat" )&lt;BR /&gt;Open *###* ("\mydir\filecopy.bat")&lt;BR /&gt;&amp;gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;Can anybody see what I'm doing wrong here?  The file definitely exists, but JMP is evidently having trouble deciding what to do with it.  (DOS &lt;I&gt;does&lt;/I&gt; know what to do with it, as if I run it from a DOS window it copies the aaa.txt file to bbb.txt as would be expected.)&lt;BR /&gt;&lt;BR /&gt;Many thanks for any help - this would be phenomenally useful to me if I could get it working.&lt;BR /&gt;&lt;BR /&gt;David</description>
      <pubDate>Fri, 12 Mar 2010 15:40:54 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/697#M697</guid>
      <dc:creator />
      <dc:date>2010-03-12T15:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/698#M698</link>
      <description>On Windows XP, JMP 8.02, this works fine for me:&lt;BR /&gt;&lt;BR /&gt;// clean up possible prior runs&lt;BR /&gt;SaveTextFile( "C:\temp\deleteme.bat",&lt;BR /&gt;	  "del C:\temp\deleteme.r"  	&lt;BR /&gt;);&lt;BR /&gt;Open( "C:\temp\deleteme.bat" );&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If one tires of the flashing DOS window, JMP 8 adds the terriffic "LoadDll" command and you are off to the races.&lt;BR /&gt; http://support.sas.com/documentation/cdl/en/hostwin/61924/HTML/default/accdll.htm&lt;BR /&gt;http://msdn.microsoft.com/en-us/library/aa363851(VS.85).aspx&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;kernel32 = LoadDLL("Kernel32");&lt;BR /&gt;kernel32 &amp;lt;&amp;lt; DeclareFunction("WinExec", Convention( STDCALL ), Alias "WinExec"),&lt;BR /&gt;	Arg( AnsiString, "lpCmdLine" ),&lt;BR /&gt;	Arg( Int32, "uCmdShow" ),&lt;BR /&gt;	Returns( Int32 ) ) &lt;BR /&gt;	);		// return value is greater than 31-&amp;gt; success&lt;BR /&gt;SW_HIDE = 0;&lt;BR /&gt;SW_MAXIMIZE = 3;&lt;BR /&gt;SW_MINIMIZE = 6;&lt;BR /&gt;SW_RESTORE = 9;&lt;BR /&gt;SW_SHOW = 5;&lt;BR /&gt;SW_SHOWDEFAULT = 10;&lt;BR /&gt;SW_SHOWMAXIMIZED = 3;&lt;BR /&gt;SW_SHOWMINIMIZED = 2;&lt;BR /&gt;SW_SHOWMINNOACTIVE = 7;&lt;BR /&gt;SW_SHOWNA = 8;&lt;BR /&gt;SW_SHOWNOACTIVATE = 4;&lt;BR /&gt;SW_SHOWNORMAL = 1;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;// some examples&lt;BR /&gt;result = kernel32 &amp;lt;&amp;lt; WinExec("Explorer C:\temp", 1);	// 1=max, 6=minimized&lt;BR /&gt;&lt;BR /&gt;show( result ); 	// returns 0 -&amp;gt; failure, nonzero -&amp;gt; success&lt;BR /&gt;&lt;BR /&gt;// fire R GUI and bring to front&lt;BR /&gt;result = kernel32 &amp;lt;&amp;lt; WinExec("Rterm", 1);&lt;BR /&gt;//&lt;BR /&gt;result = kernel32 &amp;lt;&amp;lt; WinExec("Rgui", 0);  // Rgui does not hide&lt;BR /&gt;// or, fire R term in background&lt;BR /&gt;result = kernel32 &amp;lt;&amp;lt; WinExec("Rterm", 0);&lt;BR /&gt;&lt;BR /&gt;// this works fine&lt;BR /&gt;result = kernel32 &amp;lt;&amp;lt; WinExec("C:\temp\deleteme.bat", 0);   // 1=show, 0=hide, result gt 31=success&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Best regards,&lt;BR /&gt;-Matt</description>
      <pubDate>Fri, 12 Mar 2010 16:43:18 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/698#M698</guid>
      <dc:creator>mattf</dc:creator>
      <dc:date>2010-03-12T16:43:18Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/699#M699</link>
      <description>Change your bat file to say:&lt;BR /&gt;&lt;BR /&gt;copy \mydir\aaa.txt \mydir\bbb.txt&lt;BR /&gt;&lt;BR /&gt;and I think it will work (did for me).</description>
      <pubDate>Fri, 12 Mar 2010 16:44:52 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/699#M699</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-12T16:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/700#M700</link>
      <description>Still no joy, I'm afraid: I've tried changing both the text of the BAT file as suggested and the actual DOS command to include the full paths of both files, but the problem's still there.  The following script saves "deleteme.bat" as you'd expect, but then fails to run it:&lt;BR /&gt;&lt;BR /&gt;SaveTextFile( "C:\mydir\deleteme.bat", "del C:\mydir\deleteme.r" );&lt;BR /&gt;&lt;BR /&gt;Open( "C:\mydir\deleteme.bat" );&lt;BR /&gt;&lt;BR /&gt;/*:&lt;BR /&gt;&lt;BR /&gt;Unable to open file. Unknown or ambiguous data source. &lt;BR /&gt;&lt;BR /&gt;Tried to open: /C:/mydir/deleteme.bat&lt;BR /&gt;&lt;BR /&gt;Cannot open table in access or evaluation of 'Open' , Open( "C:\mydir\deleteme.bat" )&lt;BR /&gt;&lt;BR /&gt;In the following script, error marked by /*###*/&lt;BR /&gt;Save Text File( "C:\mydir\deleteme.bat", "del C:\mydir\deleteme.r" );&lt;BR /&gt;Open/*###*/("C:\mydir\deleteme.bat");&lt;BR /&gt;&lt;BR /&gt;Could it be that the BAT file needs to have some property reset for it, or something like that?</description>
      <pubDate>Fri, 12 Mar 2010 17:22:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/700#M700</guid>
      <dc:creator />
      <dc:date>2010-03-12T17:22:26Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/701#M701</link>
      <description>(Sorry - I forgot to mention that I did create a file called "deleteme.r" in the same directory beforehand, so the problem isn't that that file doesn't exist.)</description>
      <pubDate>Fri, 12 Mar 2010 17:38:33 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/701#M701</guid>
      <dc:creator />
      <dc:date>2010-03-12T17:38:33Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/702#M702</link>
      <description>This works for me: I have a directory called c:\mydir . In it I have a text file called a.txt which contains one line of text: Copy Me. In the same directory I have a batch file called test.bat which contains one line: copy c:\mydir\a.txt c:\mydir\acopy.txt.&lt;BR /&gt;&lt;BR /&gt;I open JMP 8.0.2 and in a script window enter the line: open("c:\mydir\test.bat") and run it.&lt;BR /&gt;&lt;BR /&gt;When I check mydir I find a copy of a.txt called acopy.txt which contains the line Copy Me.&lt;BR /&gt;&lt;BR /&gt;Please try this exact scenario and report back.</description>
      <pubDate>Fri, 12 Mar 2010 17:51:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/702#M702</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-12T17:51:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/703#M703</link>
      <description>No good - I'm still getting the same error message, i.e. &lt;BR /&gt;&lt;BR /&gt;Unable to open file. Unknown or ambiguous data source. &lt;BR /&gt;&lt;BR /&gt;Tried to open: /c:/mydir/test.bat&lt;BR /&gt;&lt;BR /&gt;Cannot open table in access or evaluation of 'Open' , Open( "c:\mydir\test.bat" )&lt;BR /&gt;&lt;BR /&gt;In the following script, error marked by /*###*/&lt;BR /&gt;Open/*###*/("c:\mydir\test.bat")&lt;BR /&gt;&lt;BR /&gt;I've checked everything several times over, down to the case of the letters and creating the bat file both from a DOS window and via WordPad.&lt;BR /&gt;&lt;BR /&gt;&lt;I&gt;Many&lt;/I&gt; thanks for looking into this, but please don't spend any more time on it now as it has to be something I'm overlooking, though I can't imagine what.  I'll repeat the exercise on another machine as soon as I can, and if I find out what's going on I'll report back on this thread.&lt;BR /&gt;&lt;BR /&gt;David&lt;BR /&gt;&lt;BR /&gt;Message was edited by: David Q/R</description>
      <pubDate>Sat, 13 Mar 2010 08:03:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/703#M703</guid>
      <dc:creator />
      <dc:date>2010-03-13T08:03:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/704#M704</link>
      <description>I'm logged into XP as administrator. Wonder if that makes a difference.</description>
      <pubDate>Sun, 14 Mar 2010 00:41:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/704#M704</guid>
      <dc:creator>mpb</dc:creator>
      <dc:date>2010-03-14T00:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/705#M705</link>
      <description>The mystery has just been solved - and as was perhaps inevitable, it looks as though I inadvertantly created the problem myself.&lt;BR /&gt;&lt;BR /&gt;When I originally tried this out, I first set up an association (via Windows Explorer | Folder Options | File Types) to enable me to edit BAT files from WordPad, to save myself the bother of opening a DOS window to do it.  However, a side-effect of doing that was that JMP simply passed the file to WordPad - so I shrugged, deleted the association again and forgot about it.&lt;BR /&gt;&lt;BR /&gt;Unfortunately it appears that simply deleting an association to a BAT file after it's been created &lt;I&gt;doesn't&lt;/I&gt; restore the way that Windows deals with them to what it ought to be - and that caused several new problems, including the one I've reported here.&lt;BR /&gt;&lt;BR /&gt;Internal Support here have just dealt with it by running a registry fix on this machine - and JMP now handles the BAT file exactly as has been described earlier on this thread.&lt;BR /&gt;&lt;BR /&gt;Many thanks to everyone for their forbearance!</description>
      <pubDate>Tue, 23 Mar 2010 12:23:50 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/705#M705</guid>
      <dc:creator />
      <dc:date>2010-03-23T12:23:50Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/706#M706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;as deeper info to anyone interested:&lt;/P&gt;&lt;P&gt;it works, but in this way you can't pass parameters to the bat file.&lt;/P&gt;&lt;P&gt;Also it seems to execute it in a directory that could be different from the one in which the script is: I had some strange behaviour, but I had cmd.exe open and I didn't pursue it further since I changed my approach, maybe it was only a glitch or my fault.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;anyway, if for someone these are issues (like for me) i recommend to create and execute the bat file from inside the jsl:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;riga1 = "@echo off";&lt;/P&gt;&lt;P&gt;riga2 = "\!Ncd C:\Users\JRR\Documents\sandbox\v2.2_bat";&lt;/P&gt;&lt;P&gt;riga3 = "\!Ndir&amp;gt;urano.txt";&lt;/P&gt;&lt;P&gt;Save Text File(&amp;nbsp;&amp;nbsp;&amp;nbsp; "test_batch_write_file_selfmade.bat", riga1, mode ("replace"));&lt;/P&gt;&lt;P&gt;Save Text File(&amp;nbsp;&amp;nbsp;&amp;nbsp; "test_batch_write_file_selfmade.bat", riga2, mode ("append"));&lt;/P&gt;&lt;P&gt;Save Text File(&amp;nbsp;&amp;nbsp;&amp;nbsp; "test_batch_write_file_selfmade.bat", riga3, mode ("append"));&lt;/P&gt;&lt;P&gt;open ("test_batch_write_file_selfmade.bat")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in this way you can create a hardwired bat file using variables from jmp, and be sure on where it will be executed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 May 2013 14:23:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/706#M706</guid>
      <dc:creator>dghidoni</dc:creator>
      <dc:date>2013-05-20T14:23:02Z</dc:date>
    </item>
    <item>
      <title>Re: Can JMP call a DOS Exe</title>
      <link>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/707#M707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would also like to point out the use of \!N in dghidoni's example. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;compare:&lt;/P&gt;&lt;P&gt;SaveTextFile( "C:\Temp\cmddir.bat", "echo \!"directory list\!"\!N&lt;/P&gt;&lt;P&gt;dir\!N&lt;/P&gt;&lt;P&gt;pause\!N", mode("replace")) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;SaveTextFile( "C:\Temp\cmddir.bat", "echo \!"directory list\!"&lt;/P&gt;&lt;P&gt;dir&lt;/P&gt;&lt;P&gt;pause", mode("replace")) ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The first one (with \!N) works, the second one doesn't. Your text editor may not display the difference. But if you run cmd.exe and then type:&lt;/P&gt;&lt;P&gt;cd c:\temp&lt;/P&gt;&lt;P&gt;type cmddir.bat&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you will see the difference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 23:36:25 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Can-JMP-call-a-DOS-Exe/m-p/707#M707</guid>
      <dc:creator>blackeneth</dc:creator>
      <dc:date>2013-05-22T23:36:25Z</dc:date>
    </item>
  </channel>
</rss>

