Hi Gurus:
I'm attempting to create a program that would do a directory prompt (which I get) for the user to select their cus_main.prg file and it would automatically back up the prg & fxp files prior to recompiling. The purpose for the Getdir() is so that the Copy File command will know where to backup the cus_main.prg & fxp files prior to my earlier compile procedure since users do not manual back them up first.
There is no other users accessing this file at this time (ref. error msg. 'File in Use')
Thanks,
PM
GETDIR() && User is prompt to select dir where .prg & fxp resides
COPY FILE CUS_MAIN.PRG TO CUS_MAIN.PAK
COPY FILE CUS_MAIN.FXP TO CUS_MAIN.FAK
cMessageTitle = 'CompileMe'
cMessageText = 'Would you like to search for your directory?'
nDialogType = 4 + 32 + 256
* 4 = Yes and No buttons
* 32 = Question mark icon
* 256 = Second button is default
nAnswer = MESSAGEBOX(cMessageText, nDialogType, cMessageTitle)
DO CASE
CASE nAnswer = 6
Keyboard'enter'
CASE nAnswer = 7
Quit
ENDCASE
GETDIR() && User is prompt to select dir where .prg & fxp resides
COPY FILE *.PRG TO *.BAK
COPY FILE *.FXP TO *.BAK
lcFile = GETFILE('PRG')
if !File( ForceExt(m.lcFile,'fxp') ) && Compile once
compile (lcFile)
endif
do (lcFile)
I'm attempting to create a program that would do a directory prompt (which I get) for the user to select their cus_main.prg file and it would automatically back up the prg & fxp files prior to recompiling. The purpose for the Getdir() is so that the Copy File command will know where to backup the cus_main.prg & fxp files prior to my earlier compile procedure since users do not manual back them up first.
There is no other users accessing this file at this time (ref. error msg. 'File in Use')
Thanks,
PM
GETDIR() && User is prompt to select dir where .prg & fxp resides
COPY FILE CUS_MAIN.PRG TO CUS_MAIN.PAK
COPY FILE CUS_MAIN.FXP TO CUS_MAIN.FAK
cMessageTitle = 'CompileMe'
cMessageText = 'Would you like to search for your directory?'
nDialogType = 4 + 32 + 256
* 4 = Yes and No buttons
* 32 = Question mark icon
* 256 = Second button is default
nAnswer = MESSAGEBOX(cMessageText, nDialogType, cMessageTitle)
DO CASE
CASE nAnswer = 6
Keyboard'enter'
CASE nAnswer = 7
Quit
ENDCASE
GETDIR() && User is prompt to select dir where .prg & fxp resides
COPY FILE *.PRG TO *.BAK
COPY FILE *.FXP TO *.BAK
lcFile = GETFILE('PRG')
if !File( ForceExt(m.lcFile,'fxp') ) && Compile once
compile (lcFile)
endif
do (lcFile)