Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating files from Paradox

Status
Not open for further replies.

JE77

Technical User
Aug 29, 2002
12
IE
Hello all,
I am currently using Paradox for windows 4.5 and would like to create a new file (in the C dir for example)from a button on a form, i.e. by starting a new project in the database i can click a button to create a corresponding file in the C dir. Any ideas,
Thanks
JE77
 
Hi JE77.
A bit more explanation needed. What is this file for and what type of file is it? What are you trying to achieve through the pushbutton?
 
Hi OGriofa
I am building a DB to aid in project design. At the moment all designs have a folder each on the network. What i am trying to do is, once to user enters the new project details onto a form a new folder will be opened on the network for this new design, be it automatically or from a push-button.
I would be grateful if you can help
JE77
 
Here is the code for the pushbutton event of your button: It assumes there is a unbound field named userFolder for the user to specify the directory (folder) name:

Code:
method pushButton(var eventInfo Event)
var 
   fs            FileSystem
   returnValue   Logical
   newDir        String
endVar 
;
newDir = "C:\\"+userFolder.value
;
returnValue = fs.makeDir(newDir)
;
msgInfo("Status", iif(returnValue, "New folder created", "Folder creation failed"))
;
endMethod

Mac
Mac :)

"Gurth a choth-en-America! Tôl acharn..."


langley_mckelvy@cd4.co.harris.tx.us
 
Mac,
Thank you very much, that code worked perfect for me.
JE77
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top