devxlogo

Creating Directories

Question:
Is there any way to create a directory from within a PowerBuilder application without using the RUN command? Or is there a way to get the RUN command to complete execution and drop the DOS window completely so that other dependant code can execute properly? I am using:

Run("command.com /C mkdir C:BILLPRT",Minimized!)

However, unless processing stops (messagebox or user input), the DOS window remains and the directory cannot be used, since it appears that the RUN command has it locked.

Answer:
You can use the PFC File Service:

pfc_n_cst_filesrv.of_createdirectory()

If you are not a user of the PFC, then by examining the PFC code you can see the API call being used.

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Five Early Architecture Decisions That Quietly Get Expensive

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.