Hello,
Maybe you can play a little with the arguments. For example, this code work like we can expect:
Code: Select all
SetVar "[LastCurrentDir]" "[CurrentDir]"
SetVar "[CurrentDir]" "[PubDir]"
Run "dir" ">dirout.txt" "Hidden" "" ""
SetVar "[CurrentDir]" "[LastCurrentDir]"
In this case we take care about the current directory to tell to the "dir" command what directory we want to list. Anyway, you can view here how we can use the "> redirector". I supose that if we can use this here, maybe it's possible to use with your particular program "mcm2xml.exe".
In my opinion, it's not a good idea to create and run "BAT" files, since, for example, in some locations we don't have the appropiate privileges to do it. So, in some extreme an particular cases can be a good solution, but, in my honest opinion, we need to try some possible alternatives when available.
Maybe this article can help in some manner.