Topic
  • 4 replies
  • Latest Post - ‏2012-09-20T06:54:02Z by SystemAdmin
SystemAdmin
SystemAdmin
648 Posts

Pinned topic Creating folder under "$TOP" via Script

‏2012-09-18T11:22:39Z |
Hi,

I need to create a folder under "$TOP" directory. Though i have created the same by using Java API, but i need corresponding Script methods as well. Can anybody suggest me the same ?? Or is there an alternate way exist by which we can create a folder structure directly under "$TOP" directory via Scripting ??

Thanks in Advance.

Regards,
Prit
Updated on 2012-09-20T06:54:02Z at 2012-09-20T06:54:02Z by SystemAdmin
  • KaranBal
    KaranBal
    108 Posts

    Re: Creating folder under "$TOP" via Script

    ‏2012-09-19T17:07:49Z  
    Is your DocStore mounted?
    If it is not, then I am not aware of a way to create folders in Linux backend using MDMCS user interface.
    If your DocStore is mounted, then use any docstore related script functions to do this as er your business logic e.g. saving an output file in the docstore in desired location, say "$MOUNT/dir1/dir2/file1". $MOUNT may be $TOP or a directory within $TOP, like $TOP/mount or something else entirely like /tmp. Now, if dir1 and dir2 exist, the file will be created within it. If dir1 and dir2 don't exist, then the file will be created along with the 2 directories. Hence you can create as many nested directories as you like.
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Creating folder under "$TOP" via Script

    ‏2012-09-20T02:44:59Z  
    • KaranBal
    • ‏2012-09-19T17:07:49Z
    Is your DocStore mounted?
    If it is not, then I am not aware of a way to create folders in Linux backend using MDMCS user interface.
    If your DocStore is mounted, then use any docstore related script functions to do this as er your business logic e.g. saving an output file in the docstore in desired location, say "$MOUNT/dir1/dir2/file1". $MOUNT may be $TOP or a directory within $TOP, like $TOP/mount or something else entirely like /tmp. Now, if dir1 and dir2 exist, the file will be created within it. If dir1 and dir2 don't exist, then the file will be created along with the 2 directories. Hence you can create as many nested directories as you like.
    Thanks Karan. It is really a good idea to mount the doc store. But as per my current scenario it is not feasible to mount the doc store due to some performance issue. In that case only way left with me is to create the directory structure in AIX box directly by executing commands like 'mkdir'. But i am not sure how to achieve the same via scripting....
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Creating folder under "$TOP" via Script

    ‏2012-09-20T06:34:44Z  
    Thanks Karan. It is really a good idea to mount the doc store. But as per my current scenario it is not feasible to mount the doc store due to some performance issue. In that case only way left with me is to create the directory structure in AIX box directly by executing commands like 'mkdir'. But i am not sure how to achieve the same via scripting....
    Hi,

    If you have ability to create a folder from Java you can create a java class with a static function which you can call from a script (I am talking about of using user's jars)
  • SystemAdmin
    SystemAdmin
    648 Posts

    Re: Creating folder under "$TOP" via Script

    ‏2012-09-20T06:54:02Z  
    Hi,

    If you have ability to create a folder from Java you can create a java class with a static function which you can call from a script (I am talking about of using user's jars)
    You could just use the reflection scripting apis to create Folders. The java.io apis reflection should be enough without any additional jars.

    -Sachin