<?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: Question regarding EXECUTE cmd.exe in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502235#M187624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cristian,&lt;/P&gt;&lt;P&gt;1. Are you sure you check "Close when scirpt ends" check box in Script Execution window ? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;2. If yes, without the cmd.exe command is the window closed after finishing script?&lt;/P&gt;&lt;P&gt;3. If yes, instead of move, try following commands&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.exe /C REN&amp;nbsp;&amp;nbsp; Path\infile&amp;nbsp;&amp;nbsp; Path\infile_old;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.exe /C MOVE&amp;nbsp; Path\infile_old&amp;nbsp;&amp;nbsp; Outfile;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Oct 2013 04:02:57 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-10-22T04:02:57Z</dc:date>
    <item>
      <title>Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502233#M187622</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this is the right forum for my question.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im receiving daily files to a folder. I load these files and then want to move them from the "in files"-folder to the "out files"-folder. The script loads fine and even moves the files. But, the script never ends. It just freezes on the "Script Execution Progress" window. I can see that everything is executed but I have to Abort to proceed. I run Windows Server 2008 R2 and QlikView 11.20.12123.0 SR4 64-bit Edition (x64).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table:&lt;/P&gt;&lt;P&gt;Load * &lt;/P&gt;&lt;P&gt;From&lt;/P&gt;&lt;P&gt;$(vPath_infiles)\*.txt&lt;/P&gt;&lt;P&gt;(txt, codepage is 1252, no labels, delimiter is '\t', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EXECUTE cmd.exe /C move $(vPath_infiles)\*.txt $(vPath_outfiles);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I also tried to "xcopy" from "in files" folder to "out files" folder and then do a "del" with no luck. Same error.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any suggestions are appreciated!&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Oct 2013 22:57:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502233#M187622</guid>
      <dc:creator>mr_novice</dc:creator>
      <dc:date>2013-10-21T22:57:44Z</dc:date>
    </item>
    <item>
      <title>Re: Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502234#M187623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of giving this in script, try this in a macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Press ctrl +m and paste your macro there&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive-pre"&gt;Sub CopyFile&lt;BR /&gt; strFilePath = "x:\orig_file.txt"&lt;BR /&gt; strDestination ="x:\newpath\dest_file.txt"&lt;BR /&gt; Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt; Set objFileCopy = objFSO.GetFile(strFilePath)&lt;BR /&gt; objFileCopy.Copy (strDestination)&lt;BR /&gt; objFileCopy.Delete&lt;BR /&gt;End Sub&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Document Properties -&amp;gt; Triggers -&amp;gt; Document Event Triggers -&amp;gt; Post Reload Triggers -&amp;gt; Add Actions -&amp;gt; Add -&amp;gt; External -&amp;gt; Run Macro -&amp;gt; Give your macro name here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check this for file operations&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jagan.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 01:38:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502234#M187623</guid>
      <dc:creator>jagan</dc:creator>
      <dc:date>2013-10-22T01:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502235#M187624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Cristian,&lt;/P&gt;&lt;P&gt;1. Are you sure you check "Close when scirpt ends" check box in Script Execution window ? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;2. If yes, without the cmd.exe command is the window closed after finishing script?&lt;/P&gt;&lt;P&gt;3. If yes, instead of move, try following commands&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.exe /C REN&amp;nbsp;&amp;nbsp; Path\infile&amp;nbsp;&amp;nbsp; Path\infile_old;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.exe /C MOVE&amp;nbsp; Path\infile_old&amp;nbsp;&amp;nbsp; Outfile;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 04:02:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502235#M187624</guid>
      <dc:creator />
      <dc:date>2013-10-22T04:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502236#M187625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;Thank you for the suggestions but doing &lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt; cmd.exe /C REN&amp;nbsp;&amp;nbsp; Path\infile&amp;nbsp;&amp;nbsp; Path\infile_old;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cmd.exe /C MOVE&amp;nbsp; Path\infile_old&amp;nbsp;&amp;nbsp; Outfile;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Dont work....&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Regarding the macro Im not allowed to run macros...&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;&lt;/P&gt;&lt;P style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f6f6f6;"&gt;Other suggestions?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 20:48:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502236#M187625</guid>
      <dc:creator>mr_novice</dc:creator>
      <dc:date>2013-10-22T20:48:48Z</dc:date>
    </item>
    <item>
      <title>Re: Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502237#M187626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;....and..&lt;/P&gt;&lt;P&gt;1 - Yes&lt;/P&gt;&lt;P&gt;2 - Yes&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 21:00:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502237#M187626</guid>
      <dc:creator>mr_novice</dc:creator>
      <dc:date>2013-10-22T21:00:24Z</dc:date>
    </item>
    <item>
      <title>Re: Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502238#M187627</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;....wrong...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2 - NO. It seems that the window dont close after finishing the script. the EXECUTE commande dont seem to be the error....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 21:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502238#M187627</guid>
      <dc:creator>mr_novice</dc:creator>
      <dc:date>2013-10-22T21:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502239#M187628</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I do this regularly - there may be some hints in my script (XCOPY maybe or other parameters)&lt;/P&gt;&lt;P&gt;This also includes mapping a drive and a log file - the former MAY be important the latter not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Map Q Drive - If Necessary!&lt;/P&gt;&lt;P&gt;SET ErrorMode=0;&lt;/P&gt;&lt;P&gt;QTest:&lt;/P&gt;&lt;P&gt;LOAD filename( ) as QExists&lt;/P&gt;&lt;P&gt;FROM Q:\NHSCS\DONOTDELETE.txt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ScriptError=8 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp; LET vExecString = 'CMD.exe /c NET USE Q: \\xx.xxx.xxx.xxx\c$ passwordforadministrator /USER:ADMINISTRATOR';&lt;/P&gt;&lt;P&gt;&amp;nbsp; EXECUTE $(vExecString);&lt;/P&gt;&lt;P&gt;ENDIF&lt;/P&gt;&lt;P&gt;SET ErrorMode=1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Set CopyLog&amp;nbsp; FileName&lt;/P&gt;&lt;P&gt;LET vLogFileName = DocumentName() &amp;amp; '_CopyLog.txt';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Write time to Log File&lt;/P&gt;&lt;P&gt;LET vExecString = 'CMD.exe /c Date /t &amp;gt;&amp;gt;&amp;nbsp; ' &amp;amp; '$(vLogFileName)';&lt;/P&gt;&lt;P&gt;EXECUTE $(vExecString);&lt;/P&gt;&lt;P&gt;LET vExecString = 'CMD.exe /c Time /t &amp;gt;&amp;gt;&amp;nbsp; ' &amp;amp; '$(vLogFileName)';&lt;/P&gt;&lt;P&gt;EXECUTE $(vExecString);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Copy file&lt;/P&gt;&lt;P&gt;LET vExecString = 'cmd.exe /c ECHO .. Copy File&amp;nbsp; &amp;gt;&amp;gt;&amp;nbsp; ' &amp;amp; '$(vLogFileName)';&lt;/P&gt;&lt;P&gt;EXECUTE $(vExecString);&lt;/P&gt;&lt;P&gt;LET vFileToCopy = 'CS_PA_External.qvw';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Name of File with &lt;/P&gt;&lt;P&gt;LET vFromDir = 'D:\NHSCS\QVS_External\';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Directory Path for Source&lt;/P&gt;&lt;P&gt;LET vToDir = 'Q:\NHSCS\LIVE\QVS_External\';&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Directory Path for Destination&lt;/P&gt;&lt;P&gt;LET vExecString = 'cmd.exe /c XCOPY $(vFromDir)$(vFileToCopy) $(vToDir) /Y/Z/F &amp;gt;&amp;gt;&amp;nbsp; ' &amp;amp; '$(vLogFileName)';&lt;/P&gt;&lt;P&gt;EXECUTE $(vExecString);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Philip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 21:07:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502239#M187628</guid>
      <dc:creator>philip_doyne</dc:creator>
      <dc:date>2013-10-22T21:07:27Z</dc:date>
    </item>
    <item>
      <title>Re: Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502240#M187629</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;GRRR &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/angry.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im sorry. This was my fault. I had a problem in my script. The execute command works perfect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br&lt;/P&gt;&lt;P&gt;cristian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 21:14:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502240#M187629</guid>
      <dc:creator>mr_novice</dc:creator>
      <dc:date>2013-10-22T21:14:24Z</dc:date>
    </item>
    <item>
      <title>Re: Question regarding EXECUTE cmd.exe</title>
      <link>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502241#M187630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a sneaking suspicion that XCOPY is better then COPY for some reason but I cant remember why just at the moment.&amp;nbsp; It may be faster?&amp;nbsp; There is also some good reason for my extra / flags on the end but it is a while since I did it.&amp;nbsp; Philip&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Oct 2013 21:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Question-regarding-EXECUTE-cmd-exe/m-p/502241#M187630</guid>
      <dc:creator>philip_doyne</dc:creator>
      <dc:date>2013-10-22T21:19:23Z</dc:date>
    </item>
  </channel>
</rss>

