{{tag>category:"OpenInsight 32-Bit" author:"Paxton Scott" author:"Bob Orsini"}} [[https://www.revelation.com/the-works|Join The Works program to have access to the most current content, and to be able to ask questions and get answers from Revelation staff and the Revelation community]] ==== Make Directory (OpenInsight 32-Bit) ==== === At 07 APR 2009 05:15:08PM Paxton Scott wrote: === Greetings! I want to create a subdirectory on a network drive from an OI program. This works: from commnad box, run a bat file with this in it mkdir I:\1test\100 Pause The directory on the I drive is created. This does not: In OI subroutine: errorFlag=0 call mkDir("i:\1test\111",errorFlag) If errorFlag Then // failed debug end fails. How do I get OI to create a sub directory on a network drive? Are their likely to be different permission issues between the command prompt/bat file the Oinsight subroutine? If so How do I find and correct? Paxton ---- === At 08 APR 2009 07:55AM Bob Orsini wrote: === Paxton, the issue is with the OI mkdir function. It will not create a subdirectory unless the main directory exists. Try this: DECLARE FUNCTION UTILITY CALL MKDIR('J:\DIRA',ERR) CALL MKDIR('J:\DIRA\DIRB',ERR2) ---- === At 08 APR 2009 09:39AM Paxton Scott wrote: === Bob, Thanks for the response, but the 'first' directory does exist. I have tried "Utility" also. This is to a network (mapped) drive. Want to create a folder on a network drive. A bat file will do it, but I want to do it from OI program. Any more ideas to help me along? Paxton ---- === At 08 APR 2009 02:41PM Bob Orsini wrote: === I tried this on my network and did not have an issue. What happens if you try and create a new first path that does not exists. ---- === At 08 APR 2009 03:28PM Paxton Scott wrote: === Bob, Here is my little test: compile Subroutine test_mkdir(alkey) Declare Function Seqkey, Utility, msg errorFlag=0 dir=i:\2newdir" mkdirU=Utility("MAKEDIR",dir) dir=i:\2newdir1" call mkDir("i:\0temp\111",errorFlag) If errorFlag Then sta=Msg("","mkDir Whoops, try again.",'','','') End Else sta=Msg("","mkDir success",'','','') End If mkdirU then sta=Msg("","Utility success",'','','') End Else sta=Msg("","Utility Whoops! try again.",'','','') End Return Utility Works!, so I am happy. but mkDir did not. Thanks, I was sure I tried Utility first on this progect and it did not work. Paxton [[https://www.revelation.com/revweb/oecgi4p.php/O4W_HANDOFF?DESTN=O4W_RUN_FORM&INQID=WORKS_READ&SUMMARY=1&KEY=B5AFB51A2A41D1C9852575910074BE06|View this thread on the Works forum...]]