Creating directory from within Filepro

Kenneth Brody kenbrody at spamcop.net
Fri Jan 16 15:39:24 PST 2015


On 1/16/2015 4:34 PM, Mike Fedkiw via Filepro-list wrote:
> Using FIlepro 5.0.09
[...]
> system "cd c:\!output\invoice\Invoice_to_PDF"

That starts a command shell, which cd's to the specified directory, and then 
exits.  This might have worked in ancient 16-bit MS-DOS days, but not 
anywhere else.

> system "md"<arag(10)    'arag(10) being the customer number

This starts a new command shell, whose current directory is the same as the 
one filePro is running in, and creates the directory there.

> The directory is not being created. I could swear I've made directories
> before but I cant remember when, where or how...

Check the directory in which you are running filePro.  I'm pretty sure 
you'll see it there.

> I'm someone will show me the error of my ways, Lol
>
> Thank You in advance, I always appreciate the help I get from the site.

You can:

     (1) use CHDIR to have filePro cd to that directory, and use the
         same "md" command

or:

     (2) Put both commands into the same SYSTEM command, using the "&"
         character on the command line.  (On the command itself, not as
         filePro's "&" concatenation operator.)

         system "cd c:\!output\invoice\Invoice_to_PDF & md" < arag(10)

or, best (IMHO):

     (3) Simply pass the entire path to "md":

         system "md c:\!output\invoice\Invoice_to_PDF\ " { arag(10)

         (Note the bachslash-space-quote ending, and the "{"
         operator.)


-- 
Kenneth Brody


More information about the Filepro-list mailing list