Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
khag_hs
New Contributor

running DOS command in Macro


Hallo,

how can I run a DOS command  in a Macro?

for exampel:

copy *.txt test_new.txt /b /y

Tags (2)
1 Solution

Accepted Solutions
mwoolf
Honored Contributor II

Re: running DOS command in Macro

Set oShell = WScript.CreateObject("WSCript.shell")
oShell
.run "copy *.txt test_new.txt /b /y"

2 Replies
mwoolf
Honored Contributor II

Re: running DOS command in Macro

Set oShell = WScript.CreateObject("WSCript.shell")
oShell
.run "copy *.txt test_new.txt /b /y"

khag_hs
New Contributor

Re: running DOS command in Macro

Sorry, it doesn’t work.

 

But if I create a BAT-file which contains the command (copy *txt test_new.txt /b/y) and starts the BAT-file with the macro it works:

  

Set oShell =
CreateObject("WScript.Shell")

oShell.Run "make_a_copy.bat"

Content of the BAT-File “make_a_copy.bat”:

 

start/MIN

 

copy *.txt test_new.txt /b /y

 

exit

So, thank You for Your help, even if it’s not the direct solution.

Community Browser