question

JocarSamenian-0467 avatar image
0 Votes"
JocarSamenian-0467 asked MichaelZacharias-3701 answered

VFP 9.0 create folder

Greetings!
sir/ma'am is it possible for visual foxpro 9.0 to create a folder on a specified file path with assigned labcase number based on the value of a textbox?
another thing is to open a PDF application with pre define filename same on textbox value?
big thanks to your help, God bless

a command something like MD d:\labcases\controlno..
controlno based on value of textbox1

example syntax:
locate for d:\lacases.. (with thisform.textbox1.value) && if exist do not create a folder
IF FOUND()
&& open windows explorer on the file path created
ELSE
MD d:\labcases\ (with thisform.text1.value)
ENDIF
&& same with create PDF file

not-supported
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

MichaelZacharias-3701 avatar image
0 Votes"
MichaelZacharias-3701 answered

Hi

Something like this should work

private a, b
a = thisform.testbox1.value (or define a variable and assign it as the control source for the textbox)
if !directory(a)
mkdir(a)
else
chdir(a)
b = getfile()
endif


HTH
Mike

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.