Contact an Expert

Thread: Create folder

Permlink Replies: 1 - Pages: 1 - Last Post: Mar 11, 2012 10:40 PM Last Post By: ELSES Threads: [ Previous | Next ]

Posts: 5
Registered: 06/08/09
Create folder
Posted: Jun 1, 2009 12:49 AM
Click to report abuse...   Click to reply to this thread Reply
I would like to ask if there is any built-in function or statement in ICCAP which could create a folder in file-path I specified. The version I
used now is 2006B. THank you.

Posts: 62
Registered: 06/08/09
Re: Create folder in iccap
Posted: Jun 1, 2009 1:12 PM   in response to: cainelee in response to: cainelee
Click to report abuse...   Click to reply to this thread Reply

There is a way to do this via the system$ command.
In an IC-CAP macro or transform, system$() is a command which accesses and runs in the shell environment. For example:

1. print system$("whoami")

will print the user name to IC-CAP Status window

2. x=system$("echo $HOME")
  print "Home is defined as ",x

will print out "Home is defined as " $HOME to the
IC-CAP Status window

3. print system$("rsh remotemachine date")

will print out result of date command on remote machine named remotemachine

In regard to creating directories, one can do something like this:

print system$("dir C:/tmp")  !list dir
x=system$("mkdir C:/tmp/test_mkdir") ! do mkdir
print system$("dir C:/tmp/test_mkdir")!check exists

print system$("ls /tmp")  ! assuming /tmp exists
x=system$("mkdir /tmp/my_tmp_dir")
print system$("ls /tmp/my_tmp_dir")


The basic idea is that via the system$() command one can access the system environment and return that information into the IC-CAP environment.

Hope this helps.

Best Regards

Point your RSS reader here for a feed of the latest messages in all forums