iwcp question

In my perl script I am using iwcp to copy files/folders from workarea folders. This script is executed by a link in file menu.

with this command I noticed that files are copied just fine but for some reason the folders are not copied? here is piece of code I am using.

$src="$fpath\\$file";
$dst = "$temp_dir\\$file";
$cmd = "iwcp $src $dst";
$cmdx = `$cmd 2>&1`;


Do we need add any additional switches to the iwcp command like -r to copy the directories? any ideas?

Comments

  • I am not certain I understand your issue with respect to the example. The example only shows a file as source and dest.


    Show your folder structure and what you are getting (and wanting to get) from the command you execute.
  • Sorry about the question clarity.

    I need to read the directory (Branch/Workarea/ITS) and dump the contents into a temporary folder (Branch/Workarea/Temp Folder)

    For this, in my perl script, I am looping through folder(Branch/Workarea/ITS) and calling iwcp to copy the contents into (Branch/Workarea/Temp Folder). While looping, I may encounter file or folder it doesn't matter.

    Right now, it's just copying the files but not folders.

    My question is, does 'iwcp' works for copying the folders?

    Thanks
    -Jeff
  • It does if you use the -r option (and start at the top of the dir you want to copy)
  • Thanks for reply. I will try it out.
  • It does if you use the -r option (and start at the top of the dir you want to copy)
    I'm glad to see that they finally documented iwcp in the 6.7.1SP1 CLT manual ...
TeamSite Developer Resources

  • Docker Automation

  • LiveSite Content Services (LSCS) REST API

  • Single Page Application (SPA) Modules

  • TeamSite Add-ons

If you are interested in gaining full access to the content, you can register for a My Support account here.
image
OpenText CE Products
TeamSite
APIs