Re: run command
- From: cj <cj@xxxxxxxxxxxxx>
- Date: Thu, 08 Mar 2007 14:46:52 -0500
I did this
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='cmd /K copy "c:\test\headerfile.txt" + ' + mfname + ' ' + mtargname
MESSAGEBOX(mcmd)
run &mcmd
The cj.txt was copied and the DOS window remained open. I typed exit in the DOS window to allow the FoxPro program to continue. cj2.txt flashed open a DOS windows but it didn't remain open and the file was not copied. ??????
Jan Bucek wrote:
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: Jan Bucek
- Re: run command
- References:
- run command
- From: cj
- Re: run command
- From: Jan Bucek
- run command
- Prev by Date: Re: run command
- Next by Date: Visual Foxpro MSCOMM & Barcode Reader
- Previous by thread: Re: run command
- Next by thread: Re: run command
- Index(es):
Relevant Pages
|