hexagon logo

Using script to create folder for prg and save part program

Been reading up on the script manual (PC-DMIS) 3.6 Basic Language Reference Manual) trying to figure out how to get the script to create a folder for the report, the .prg, and any other files associated with the program by serial number of the part.

For example:
PART#_DESCRIPTION_SERIAL#_DATE_TIME

The goal is to write a script contained in the .prg that, upon execution of the part program, will create a folder in a specified directory with the variable filename using the inputs from the part program and save the .prg with the same name.

How would I pass the information from the operator inputs of the part program into the script to make this happen?
Parents
  • So what command (syntax) actually creates the folder I want? CreateObject?


    I would really recommend that you go to your local used bookstore and pick up a book on VBScript. No offense, but this question demonstrates a complete lack of understanding about what's going on. You need to obtain a basic understanding before taking off. (a book is how I got started on my first programming language - VAX VMS based Fortran77!)

    Anyways, to answer your question: there are a couple of ways to create the folder(s) you can use the VB based MkDir() to create the folder(s), along with Dir() to see if it needs to be created, or you can use the scripting file system object as vpt does in his script.
Reply
  • So what command (syntax) actually creates the folder I want? CreateObject?


    I would really recommend that you go to your local used bookstore and pick up a book on VBScript. No offense, but this question demonstrates a complete lack of understanding about what's going on. You need to obtain a basic understanding before taking off. (a book is how I got started on my first programming language - VAX VMS based Fortran77!)

    Anyways, to answer your question: there are a couple of ways to create the folder(s) you can use the VB based MkDir() to create the folder(s), along with Dir() to see if it needs to be created, or you can use the scripting file system object as vpt does in his script.
Children
No Data