Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can RUN window appear inside a VFP window?
Message
From
20/07/2006 16:59:06
 
 
To
20/07/2006 08:41:18
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01137462
Message ID:
01138228
Views:
13
>>>>I am calling pkzipc (a DOS program) repeatedly with RUN command from a form. It would be more elegant if the DOS boxes appeared inside the VFP form. Is there any way to accomplish this?
>>>>
>>>>TIA,
>>>>
>>>>Alex
>>>
>>>See message#1095760
>>
>>Thank you for the reference, Tore.
>
>Sorry for jumping in so late - I'm using pkzip25 (the last DOS-type, command line freebie from Phil Katz, probably around 1998) and wrap it up using API_APPRun class by late Ed Rauh. One of the parameters when running it is the status of the target window - mine runs with "HID". IOW, no window whatsoever. The business part of the code looks like this:
>
		lcZipName=This.zipname
>		listfile=Fullpath(".\zip.lst")
>		Strtofile(This.Files, listfile)
>		lcbatFile=Fullpath(Forceext(Sys(2015),"bat"))
>		logfile=Forceext(lcbatFile,"log")
>		This.logfile=logfile
>
>		TEXT textmerge noshow to lcBat
>pkzip25 -add=update -dire <<lcZipName>>  @<<listfile>> ><<logfile>>
>		ENDTEXT
>		lcThere=Fullpath(".")
>		Strtofile(lcBat, lcbatFile)
>		Local oprocess As api_apprun Of Process.vcx
>		oprocess=Newobject('api_apprun','process', '', lcbatFile, lcThere, 'HID')
>		oprocess.LaunchAppAndWait
>		Release oprocess
>		Erase (lcbatFile)
>
>The listfile is just the same old list of filespecs you want to include in the zip - this is for backing up my work, so it looks like this:
>
M:\RAD\APVFP\OS DZ\SET_ALL.PRG
>M:\RAD\APVFP\OS DZ\STARTME.PRG
>M:\RAD\APVFP\OS DZ\OSDZ.PJX
>M:\RAD\APVFP\OS DZ\OSDZ.PJT
>M:\RAD\APVFP\OS DZ\SCX\MTRO.SCX
>M:\RAD\APVFP\OS DZ\SCX\MTRO.SCT
>M:\RAD\APVFP\OS DZ\SCX\OTUDJE.SCX
>M:\RAD\APVFP\OS DZ\SCX\OTUDJE.SCT
>M:\RAD\APVFP\OS DZ\SCX\LJUDI.SCX
>M:\RAD\APVFP\OS DZ\SCX\LJUDI.SCT
>M:\RAD\APVFP\OS DZ\SCX\KUPDO.SCX
>M:\RAD\APVFP\OS DZ\SCX\KUPDO.SCT
>M:\RAD\APVFP\OS DZ\SCX\AMGRUP.SCX
>M:\RAD\APVFP\OS DZ\SCX\AMGRUP.SCT
>M:\RAD\APVFP\OS DZ\SCX\POPIS.SCX
>M:\RAD\APVFP\OS DZ\SCX\POPIS.SCT
>M:\RAD\APVFP\OS DZ\SCX\REVAL.SCX
>M:\RAD\APVFP\OS DZ\SCX\REVAL.SCT
>M:\RAD\APVFP\OS DZ\SCX\OSSR.SCX
>M:\RAD\APVFP\OS DZ\SCX\OSSR.SCT
>
>I generate that previously using aDir() on selected directories and extensions (don't want to backup .fxp, .bak and few other types).
>
>In some situations, I've found that it's best to have every filename in the .bat file fullpathed, and surrounded by quotation marks. Also, I found that PkZip25 doesn't really handle UNCs.

Thanks Dragan. Until recently I have made backups using batch files that call batch files that call pkzipC, and finally I am doing something in VFP which is obviously much easier to maintain. (Inertia is a terrible thing). Naturally, with VFP it is not necessary (or good) to use a command line zip routine. I'm going to use Dynazip which I use in other places. So thanks to all who helped, in particular to Anatoliy. Your idea seems interesting though I never got to it.

By the way, pkzipC is a much later version that handles UNCs.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform