Just a quick question regarding ExecuteCommand() TI function. I'm trying to move a file between one location to another. The function works perfectly when I type in the file in the source folder. I would like to add a variable to ExecuteCommand() function instead of the exact file name. To clarify:
Code: Select all
ExecuteCommand('robocopy /move c:\origin c:\destination TestA.txt', 0);
Code: Select all
vFileName = 'TestA.txt';
vCmd = 'robocopy /move c:\origin c:\destination vFilename';
ExecuteCommand(vCmd,0);
What puzzles me is that you can add a variable (vCmd) to the ExecuteCommand() function but you cannot add the variable (vFilename) to robocopy. Is there a way to move the file using the ExecuteCommand() function using variables instead of the exact file name. The reason I want to use variables instead of the exact file name is because this ExecuteCommond() function is going to be at the end part of a loop that will move the files after the T.I. has finished with them.
Regards,
Magnus