cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Input file format for the "im createcontent" and "im importcontent" commands ?

amatei
12-Amethyst

Input file format for the "im createcontent" and "im importcontent" commands ?

Hello,

The "im createcontent" and "im importcontent" commands allow to provide an input file.

Can someone help info with the structure of such an input file ?

--addAttachment=value

adds attachments to the issue, where value is of the form "fieldName,path=pathToFile[,name=nameOfAttachment][,summary=shortDescription] " .

 

Correction: I am not interested in the --addAttachment=value parameter but rather in the [(-F file | --selectionFile=file)] parameter

 

Thank you!

 

1 ACCEPTED SOLUTION

Accepted Solutions
MichaelChatel
20-Turquoise
(To:amatei)

Hi Amatei,

 

I'd suggest opening a Support case, with the Integrity team, to double-check.  It sounds like the --addAttachment example you showed, is not even relevant to your usage or question now then? 

 

Here's the help section, for the --selectionFile option:

http://support.ptc.com/cs/help/integrity_hc/integrity122_hc/en/#page/IntegrityHelp%2Foptions.html

 

It's just a general option to be used with certain CLI commands, so it's documented on its own.

I don't think you'll be able to use it, in the manner you wish.  It's just for selections that the CLI command should run against (ex.  Item IDs,

 

--selectionFile=file
provides an alternative way to specify the selection. The specified file is a text file containing a list of file names, members, projects, or sandboxes, one per line. The command operates on all the listed files.
* 
The --selectionFile option is only relevant for commands that have selections and can only be used to specify the command selection (not command options). Be careful to avoid duplications. In some cases if a file, member, project or Sandbox is listed twice in the file, the command may report an error.

 

View solution in original post

4 REPLIES 4
MichaelChatel
20-Turquoise
(To:amatei)

Hi Amatei,

 

Are you really asking about the --selectionFile, to be used to provide input to the CLI command, to process against?

Or are you simply asking about the --addAttachment option, to allow you to add an attachment to the content you are creating/importing?

 

Your example seems to point to the latter.

 

You may want to open a Support case for this, but here is an example of the --addAttachment option you can use:

--addAttachment="field=Attachments,path=c:/temp/notes.txt,name=notes123.txt,summary="Notes for item 123""
This adds the existing notes.txt file as an attachment with the name of notes123.txt.
 
If you do not specify the name of the attachment, the file name is used as the attachment name. You can use this option multiple times to specify multiple attachments on the CLI.  A segment or node cannot have more than one attachment with the same name.
 
 

Hi

 

I need details about --selectionFile, to be used as input file to the CLI command, to be processed line by line.

Hi,

 

I have the same question  for the other two commands:

im createsegment
im importsegment

 

How to use the --selectionFile parameter?

I find absolutely no example in the documentation

 

[(-F file | --selectionFile=file)] 

MichaelChatel
20-Turquoise
(To:amatei)

Hi Amatei,

 

I'd suggest opening a Support case, with the Integrity team, to double-check.  It sounds like the --addAttachment example you showed, is not even relevant to your usage or question now then? 

 

Here's the help section, for the --selectionFile option:

http://support.ptc.com/cs/help/integrity_hc/integrity122_hc/en/#page/IntegrityHelp%2Foptions.html

 

It's just a general option to be used with certain CLI commands, so it's documented on its own.

I don't think you'll be able to use it, in the manner you wish.  It's just for selections that the CLI command should run against (ex.  Item IDs,

 

--selectionFile=file
provides an alternative way to specify the selection. The specified file is a text file containing a list of file names, members, projects, or sandboxes, one per line. The command operates on all the listed files.
* 
The --selectionFile option is only relevant for commands that have selections and can only be used to specify the command selection (not command options). Be careful to avoid duplications. In some cases if a file, member, project or Sandbox is listed twice in the file, the command may report an error.

 

Top Tags