VFP 9.0 create folder

Jocar Samenian 1 Reputation point
2021-04-16T23:54:24.913+00:00

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 Monitored
Not Monitored
Tag not monitored by Microsoft.
36,002 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Michael Zacharias 1 Reputation point
    2022-01-16T03:37:36.157+00:00

    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

    0 comments No comments