run command



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 . . .
.



Relevant Pages

  • Re: run command
    ... Why doesn't this work in VFP 8? ... dimension inbarray ... run &mcmd ...
    (microsoft.public.fox.helpwanted)
  • Re: visual foxpro crashes
    ... Microsoft FoxPro Technical Support ... Keep an eye on the product lifecycle for Visual FoxPro here: ... progam that uses data from VFP is a dos based C program. ...
    (microsoft.public.fox.vfp.dbc)
  • Re: VFP 9 performance issue
    ... The query returns around 20 records. ... The bottom line is this. ... convice them to convert from DOS foxpro to VFP. ... I have been developing new modules in VFP 9.0. ...
    (microsoft.public.fox.programmer.exchange)
  • Re: stability of VFP ODBC driver...
    ... OLE-DB provider while others are accessing the same tables using FP2.6 DOS? ... The VFP ODBC is ... the VFP ODBC driver will not read VFP tables if they have field ...
    (microsoft.public.fox.programmer.exchange)
  • Re: VFP 9 performance issue
    ... You say DOS is "blazingly fast". ... it sounds to me like you need to fix the environment. ... I have been developing new modules in VFP 9.0. ... Sorry for the letting off steam here. ...
    (microsoft.public.fox.programmer.exchange)