Page 1 of 1

Move files using ExecuteCommand

Posted: Fri Jul 18, 2014 9:24 am
by bassmad
Hi guys,

Very simple question. I am trying to archive a file when I am done loading it. I have done this in the past with the ExecuteCommand function few years back and I just cant remember the syntax for the command. I have Googled it and also searched the forum but cant find it.

Could any sympathetic soul help me out please?

Re: Move files using ExecuteCommand

Posted: Fri Jul 18, 2014 9:37 am
by Alan Kirk
bassmad wrote:Hi guys,

Very simple question. I am trying to archive a file when I am done loading it. I have done this in the past with the ExecuteCommand function few years back and I just cant remember the syntax for the command. I have Googled it and also searched the forum but cant find it.

Could any sympathetic soul help me out please?
You don't do it directly from the ExecuteCommand function. Instead you use the ExecuteCommand function to run (typically, in this case) a DOS batch file, which does the move.

A primer for creating batch files, including passing parameters to them so that you can specify which file(s) you want to archive, will be found here.

Re: Move files using ExecuteCommand

Posted: Fri Jul 18, 2014 10:48 am
by bassmad
I remember doing this good few years ago. Type in the cmd which included creating folders and moving files. This did not include any batch files. This was probably version 9.0. Has this all changed now? I am now on version 10.1.1

Thanks for your reply

Re: Move files using ExecuteCommand

Posted: Fri Jul 18, 2014 11:53 am
by Alan Kirk
bassmad wrote:I remember doing this good few years ago. Type in the cmd which included creating folders and moving files. This did not include any batch files. This was probably version 9.0. Has this all changed now? I am now on version 10.1.1
It doesn't have anything to do with the TM1 version. However since ExecuteCommand is essentially executing something that is, well, executable, you could directly call anything that is an external command line application such as, for instance, Robocopy. If you weren't using batch files before (which I'd prefer to stick with since they provide the option for some error handling, however rudimentary) you may well have been using that.