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

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 </QUOTE> —- === At 08 APR 2009 07:55AM Bob Orsini wrote: === <QUOTE>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) </QUOTE> —- === At 08 APR 2009 09:39AM Paxton Scott wrote: === <QUOTE>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 </QUOTE> —- === At 08 APR 2009 02:41PM Bob Orsini wrote: === <QUOTE>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. </QUOTE> —- === At 08 APR 2009 03:28PM Paxton Scott wrote: === <QUOTE>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 </QUOTE> View this thread on the Works forum...

  • third_party_content/community/commentary/forums_works/b5afb51a2a41d1c9852575910074be06.txt
  • Last modified: 2023/12/30 11:57
  • by 127.0.0.1