Forum Discussion
function CheckIfThereIsXMLinInputFolder()
{
// Launch console
var shell = Sys.OleObject("WScript.Shell");
var exec = shell.Exec("console I use for testing");
// Input text to winscp.com window
exec.StdIn.Write(
"open session\n" +
"cd folder I check the xml file existense on server\n" +
"ls\n" +
"exit\n");
// we store all output from the winscp.com window
var output = exec.StdOut.ReadAll();
// we store up status from going through output and searching from it if there
// is an file with .xml ending there
var result = aqString.Find(output,".xml")
// if we find a file with .xml ending we do this
if(result != -1)
Log.Message("Found an file with .xml ending, therefore need to run xyz again")
// and if we don't we can happily proceed with copying files...
else
Log.Message("Didn't find any xml ending files")
}
Related Content
- 3 years ago
- 2 months ago