Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I want to use the Execute comand of QV in order to copy a file from one path to another but I have 2 problems:
1- My path contains spaces
2- My file has dinamical name such as Name(Date).
3- I have to set a proxy to acces to the DB.
I tryed to create a . bat file but since my path contains spaces and i have to create the file dinamicaly Is not possible. The reason is that QV is adding extra " on the path and then the console does not recognize it as a path. I have read Extra double quotes when store as TXT | Qlik Community but using a .xml file i have then to convert it to .bat in order to use us it bu I can't do that becaus the path contains spaces.
I think that the simplest way to do this is with various lines in the same comand sesion:
EXECUTE cmd.exe /C set ProxyVar=ProxyPath
ExacutableFile.bat
Is it possible? There is a way to save the .bat file without the extra "?
Thank you
Seems like QV does not like to concatenate the Set proxy statement because :
execute cmd /c "pause && pause";
Works but not:
execute cmd /c "set Proxy=ProxyWebPath && pause";
the two variables are defined in your Windows environment ?
Finaly I got to a solution:
Given a Bat File like:
Set Proxy=ProxyWebPath
Copy FromPath\Filename%1 FromPath\Filename%1
Where %1 is a variable that can be introduced to the .bat file after executing the bat file and with a space in between like:
BatFilePaht\Document.bat VariableValue
So the solution is:
Execute cmd /c " "BatFilePaht\Save.bat" $(vDateText) ";
Thank You both for your help