Print  
Gray star Gray star Gray star Gray star Gray star --Not rated--
240 Visits 4 Comments
Created
Sergey Koltogyan Sergey Koltogyan
Kablink Component
  • -- select one --

How from the command line( linux bash) put files to the Cablink FIle-Folder ?

( It is necessary in an automatic mode in a shared folder in cablink to spread once a day files (approximately 300 files).)

 

How from the command line delete some files (mask by name or mask by date creation) ?

 

Serg

Workflow
Process State Action
Discussion workflow Active
This entry is currently active
Attachments(0)
Entry History
Tags
 
Replies
Thumbnail Image
Jong Kim Jong Kim

It is not possible to add files to Teaming simply by moving files physically into some directory outside of the Teaming software.

If you need a means for adding files to Teaming without using browser-based interface and put the processing on a schedule, probably the best bet is to write a standalone web services program that does that.Teaming web services API allows adding and deleting files. You can write a program that drives that, and run it from command line.

Check our Teaming development guide for information on how to use web services. If you have Teaming source code with you, some web services samples are available under ssf/samples/wsclient.

Thumbnail Image
Peter Hurley (Novell) Peter Hurley (Novell)

Of course, the obvious way to add files to a Kablink file folder is to use WebDav. Just copy the file right to the WebDav url for that folder.

Thumbnail Image
Sergey Koltogyan Sergey Koltogyan
Kim, Jong   and Hurley (Novell), Peter
Thank your for answers..
Yes, i`m need put files in to the Teaming in Automate mode..
Example: Every day at 23:10 cron run script:
/root/bin/putfiles.sh
And all files  (*.gsm) from the folder
/var/spool/myfiles
automate import to the file-folder kablink user: userA.

May be exist any examples ??

Serg
Thumbnail Image
Jong Kim Jong Kim

The source code for Kablink Teaming 2.1 is available at https://kablink.svn.sourceforge.net/svnroot/kablink/branches/cortez/ssf, and the web services samples can be found in ssf/samples/wsclient under the tree.

For your need, probably the best template you can copy and work with is in the TeamingServiceClientWithStub.java class. Take a look at the beginning part of the checkEntry() method. I believe it has the core logic you would need. The getTestFolder() call shows you how you can get a handle on the parent folder by its path name into which you want to put files. Then the next few lines of code shows you how to create an entry (with just title and description fields set), attach your "local" file to the entry, and upload the whole thing to create a new entry with an attachment in a single web services call (via stub.folder_addEntry() method). You would need to repeate this logic in a loop to process all of the files on your client machine. Then, of course, put your Java executation on a scheduler (cron or whatever).

Skip Footer Toolbar