Re: run command
- From: Jan Bucek <bucek.jan@xxxxxxx>
- Date: Thu, 08 Mar 2007 19:03:32 +0100
use "cmd /C COPY ..... " in your string
or
"cmd /K COPY ... " to force the command window to wait and show the results
cj napsal(a):
This command works fine from the dos prompt.
copy "c:\test\headerfile.txt" + "c:\test\from dir\cj.txt" "c:\test\from dir\to dir\cj.txt"
Why doesn't this work in VFP 8?
dimension inbarray[2]
inbarray[1]="cj.txt"
inbarray[2]="cj2.txt"
mfname='"c:\test\from dir\'+inbarray[i,1]+'"'
mtargname='"c:\test\from dir\to dir\'+inbarray[i,1]+'"'
mcmd='copy "c:\test\headerfile.txt" + ' + mfname + ' ' + mtargname
MESSAGEBOX(mcmd)
run &mcmd
The dos screen goes so quick I can't see what it says if anything. So, I then tried this.
mcmd ='pause'
run &mcmd
It works. Dos window opens with
C:\test>pause
Press any key to continue . . .
- Follow-Ups:
- Re: run command
- From: cj
- Re: run command
- References:
- run command
- From: cj
- run command
- Prev by Date: run command
- Next by Date: Re: run command
- Previous by thread: run command
- Next by thread: Re: run command
- Index(es):