system command

Brian K. White brian at aljex.com
Fri Jun 17 14:05:57 PDT 2016


On 6/17/2016 4:02 PM, Kenneth Brody via Filepro-list wrote:
> On 6/17/2016 3:37 PM, Roland Fischer wrote:
>> Hi Ken
>> tried command with pauses, I just get message 'Press any key to continue
>> .. .' one message for each pause
>> statement >  Also tried command with 'noredraw' with same result
>
> And nothing displayed after the first pause and before the second?  No
> error, and no "1 file(s) copied"?
>
> [...]
>> Try putting a "pause" before and after the command, so you can see what's
>> going on.
>>
>>     system "pause & copy /y c:" { bs { "test.txt testnew.txt & pause"
>
> Try adding an "echo" before the "copy" so you can see what, exactly, was
> passed:
>
>   system "pause & echo copy /y c:" { bs { "test.txt testnew.txt & pause"
>
> Obviously, the command line is being executed, since you get the two
> "press any key to continue" messages.
>

Stick a dir command in there before or after the copy.

The second filename has no path, which means it will appear in the 
current directory, but what is the current directory? The command does 
not include a CD to go any place explicit, so it you could be sitting 
anywhere.

system "copy /y c:" { bs { "test.txt testnew.txt & dir & pause"

Or really just make the system command echo the command like Ken showed, 
but then just put a cmd after that, so that you are given an interactive 
prompt that you can do whatever you want in there as long as you want. 
Do a DIR, paste the command from the echo and run it, and see if there 
are any errors etc. Type exit to conclude the system command and resume 
back to the filepro processing.

system "echo copy /y c:" { bs { "test.txt testnew.txt & cmd"

The child cmd of the system command should have just about the same 
environment as the system command itself, ie all the same environment 
variables, sitting in the same directory, running as the same user with 
the same permissions, etc.

-- 
bkw


More information about the Filepro-list mailing list