Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3309

Re: HCI DS: Move successfuly processsed file to different directory

$
0
0

Hi Kiran,

 

Yes, that`s possible.

 

Please see below:

 

First of all you would need a batch file that contains a move command.

bat.PNG

 

This MoveFile.bat is being called from HCI via the exec() function which sends a command to the operating system.

You can pass parameters to the bat file, like in the example one parameter with the file name to be moved to the Archive folder.


script2.png



In the example there is also a print() function which will help for troubleshooting, because will print the result (or error) from the .bat command into the trace log.One challenge could be with the file names is that “\” is a character with a special meaning in the HCI script language. So for the \ in the file paths, you need to escape it and use ‘\\’

As a tip: use several print statements if you want to understand what’s happening to print out any variables etc you are using.


Regards

Alecsandra


Viewing all articles
Browse latest Browse all 3309


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>