Is there a way to save "Script Execution Progress" in a file? - qlikview

Is there any way I could save the "Script Execution Progress" in file?
When I tried the following code, it generated a empty file.
C:> "C:\PROGRAM FILES\QLIKVIEW\QV.EXE" /R "C:\Q1.qvw" >> "log\VistoriasEmergenciais.log"
Thanks

Related

How to get emailable-report.htm from a dynamic path

I am trying to add the emailable-report.html file to my out going Jenkin's email. However, I cannot figure out how to grab it as the folder name changes (time stamp) every time I execute my Selenium scripts.
My Selenium emailable-report.html file is saved into a path … “test-results/ 17_Dec_2018_08_05_AM/emailable-report.html”
By chance, does anyone know how I can handle the date/folder name variable (or find it) “17_Dec_2018_08_05_AM” from the Selenium execution into my Jenkin’s path?
Sperately, I tried in Post Steps, robocopy the file to a different folder : (no luck)
#echo off
cd /d "C:\Users\Public\BT-3ROX\Transform Supervision - UI"
robocopy ./test-results/**/emailable-report.html ./Archive/test-results/latest-emailable-report.html /E /MOVE /MT[:50] /NFL /NDL /NJH /NJS /nc /ns /np
#echo on
With no luck to attach the file.
Any info on how to find/use the dynamic folder variable to use "17_Dec_2018_08_05_AM"(etc...)?

How to run SQL scripts from the command line (or in batch script) by DATE MODIFIED

I am trying to automate the build/deploy process for our application through Teamcity. One of the steps I need to do through Teamcity is to run the .sql files on the databases. I am able to implement this step, however it runs all of the scripts each time which is very time consuming. I was wondering if there was a way to only run the updated/added .sql files (after running svn-update), or to only run the .sql files that were modified by a certain date, or something to that effect. The script I have now simply runs all sql files in the current directory (including subfolders).
for /R %%G in (*.sql) do sqlcmd /S server /U user /P password /d database -i"%%G"
So is there a way i could possibly tweak this, something like
for /R %%G in (*.sql) where date_modified > "1_28_2016" do sqlcmd /S server /U user /P password /d database -i"%%G"
Or am I way off track here? ANY feedback will help! Thanks!
NOTE: I believe a similar if not same question was asked on here before with almost no feedback that did not seem to work. I am posting again in hopes of finding an answer/reviving the question.

How to launch a .bat file in VB without associating the file with the program that launched it?

Ok, the the question looks freakish, but this is sort of a continuation of the question I posted
here.
So, I create a .bat file in Visual Studio with certain lines and launch it, but it basically doesn't find the files it needs, but if I launch the .bat file it created manually, it works.
The problem, as far as I see it, is that the .bat file the program launches isn't the same as the one that is created in the folder?
The .bat files use the command line interface of Asesprite found here, e.g. :
#set ASEPRITE="C:\Program Files\Aseprite\aseprite.exe"
%ASEPRITE% --batch animation.ase --scale 2 --save-as animation-x2.gif
I'm not sure which part of the VB code I'd need to share, so ask if needed.
The error in .bat goes something like:
C:\Users\User\Desktop\aseConverter\aseConverter\bin\Debug>"E\Asesprite\asesprite.exe" --batch skeleton2_gib3.ase --scale 1 --save-as skeleton2_gib3.gif
File not found: "skeleton2_gib3.ase"
Error loading file "skeleton2_gib3.ase"
A document is needed before --save-as arguement
The first line should not be the Debug folder, but the location the .bat file was created in. I've no idea how to fix it.
It SHOULD be
C:\Users\User\Desktop\skeleton>"E\Asesprite\asesprite.exe" --batch skeleton2_gib3.ase --scale 1 --save-as skeleton2_gib3.gif
The problem here is that the batch file references files without path. Therefore the files must be in current working directory of the batch file.
But the batch file respectively command line interpreter cmd.exe is called by the VB.net without setting the working directory. Therefore the current working directory set by Windows for the batch file is the same as of the starting VB.net application.
But the starting application creates the batch file and the other files in a different directory, not in its own current working directory.
One solution is changing current working directory inside batch file to the directory the batch file is stored. This can be done by referencing argument 0 of the batch file which contains name of batch file with complete path.
What does %~dp0 mean, and how does it work? explains how to get drive and path of batch file.
Therefore one solution is to use a batch file like below:
#echo off
cd /D "%~dp0"
set "ASEPRITE=%ProgramFiles%\Aseprite\aseprite.exe"
"%ASEPRITE%" --batch animation.ase --scale 2 --save-as animation-x2.gif
See help output after executing cd /? in a command prompt window for meaning of parameter /D (change also drive if necessary).
An explanation for %~dp0 can be read on running call /? or for /? in a command prompt window.
Another possibility would be the usage of following batch code:
#echo off
pushd "%~dp0"
set "ASEPRITE=%ProgramFiles%\Aseprite\aseprite.exe"
"%ASEPRITE%" --batch animation.ase --scale 2 --save-as animation-x2.gif
popd
The difference to command cd is explained in help which is output in a command prompt window after executing pushd /?.
Best would be to create the batch file with all files referencing with complete path, name and file extension.

xcopy /d copy all files every time, even unchanged files

i try this command line
xcopy e:\myfolder /EXCLUDE:excludeList.txt \\192.168.158.15\public\comp\myfolder /E/I/D/R/H/Y
the command copy all files every time even unchanged files
i use /d that suppose to copy just newer files.
a small test shows it does work. you must have other problem ...
edit
in netwoek enviroment - you should add /z

xcopy "Access denied" with /y /o /s /c /h

I'm currently refining and updating my offline virus database updater for Malwarebytes. It's simply all the Malwarebytes data from C:\ProgramData\Malwarebytes (virus database, build number, etc) inside an SFX .exe archive set to run a batch file after successful extraction.
The Problem
My existing updater works by copying each file with individual xcopy commands, but this time I want it to simply copy the whole folder. But when trying to xcopy to C:\ProgramData, I get "Access denied" for everything.
This occurs even though I'm using the /y and /o switches and running the .exe as Administrator (from the context menu) to achieve elevated permissions. I know that I'm hitting the right directory and that the update does work with a manual copy and paste of the folder.
Is it just that it's not possible to command-copy a folder to ProgramData in Windows 7?
Extra Information
Inside the SFX .exe archive, I have a folder called "Malwarebytes" and a batch file. This is the only relevant segment of the batch file (I have independently confirmed that the rest of it works):
xcopy "Malwarebytes" "C:\ProgramData\Malwarebytes"\ /y /s /c /h /o
Odd.. It just started working.
The only idea I have for this is that when I was trying this, I was trying it with an activated version of Malwarebytes, which means that it was running a service in the background, whereas this time I was not using an activated Malwarebytes'.
This could have possibly been denying access to the files because they were in use.
I don't know. Thanks anyway, guys.
I have encountered this problem without pin pointing the problem However I used Robocopy instead. So simply replace xcopy with Robocopy with appropriate switches and it should work ...