Create Dir UNC (OCX)

Administrator
Administrator Member, Moderator, Administrator Posts: 2,506
edited 2008-02-01 in Download section
Create Dir UNC (OCX)
May be you'll have to create a folder on a Shared folder, but with the LAutFileSystemObject you can't. So Register this ocx, and write the followinfg function in a codeunit and use it like this

CreateSubDirUNC(''\\computer\share\2000\10');
\\computer\share\2000\ must exist or use before
CreateSubDirUNC(''\\computer\share\2000');

Function to paste in a codeunit: with variable
Name DataType Subtype Length
CreateFold OCX MyCreateFolderOCX Control

CreateSubDirUNC(ItxtSubdir : Text[1024])

CLEAR(CreateFold);
CreateFold.CreateFolder(ItxtSubdir);

http://www.mibuso.com/dlinfo.asp?FileID=939

Discuss this download here.

Comments

  • janpieter
    janpieter Member Posts: 298
    it is not necesarry to use an ocx object to achieve this.
    i think you can use the shell command like this somehow:
    Shell('md "\\computername\share\2000\10');
    

    though i'm not totally sure.
    if you think the security messages are anoying use the automation variable 'Windows Script Host Object Model'.WshShell (lclsShell) and the 'run' method of this object.
    CREATE(lclsShell);
     lclsShell.Run('md "\\computername\share\2000\10', 1, 3);
     CLEAR(lclsShell);
    

    These methods do not require you to distribute an OCX file to client computers.
    In a world without Borders or Fences, who needs Windows and Gates?
  • kriki
    kriki Member, Moderator Posts: 9,121
    janpieter wrote:
    variable 'Windows Script Host Object Model'.WshShell (lclsShell) and the 'run' method of this object.
    CREATE(lclsShell);
     lclsShell.Run('md "\\computername\share\2000\10', 1, 3);
     CLEAR(lclsShell);
    
    Check this : http://www.mibuso.com/forum/viewtopic.php?t=12417
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!