Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

need a query that will help us to distinguish between file and folder

We have a script that fetch files from RTC db , source might be stream/workspace/snapshot
We use scm gommanf to retrieve the list of files:
scm.exe --config F:\AmatSW\swusers\BNahum90789\.rtc\1\system\scm-config --non-interactive list remotefiles -r BNahum90789 -j --depth - --workspace BoazMainWF1_strm Qrtc /
               {    "remote-files": [        {            "path": "\/",            "state-id": "_PzQxZfegEeOX8vm88IZW1g",            "uuid": "_PzQxZPegEeOX8vm88IZW1g"        },        {            "path": "\/load_rules\/",            "state-id": "_89mdgPegEeOX8vm88IZW1g",            "uuid": "_7A6uYPegEeOMjqa-FSMiRQ"        },
 {     "path": "\/load_rules\/FullDynamic.loadrule",     "state-id": "_39bRgQSAEeSX8vm88IZW1g",     "uuid": "_7BEfYPegEeOMjqa-FSMiRQ" },
 
     }
Now we iterate on each entry and fetch  it:
scm.exe --config F:\AmatSW\swusers\BNahum90789\.rtc\1\system\scm-config --non-interactive get file -r BNahum90789 --overwrite _7BEfYPegEeOMjqa-FSMiRQ _39bRgQSAEeSX8vm88IZW1g Qrtc\load_rules\FullDynamic.loadrule
Our  problem:
We have no way to distinguish between file and folder, so when trying to fetch a folder we get this exception:
   java.lang.Exception: Problem running 'get file':
  Invalid item _PzQxZPegEeOX8vm88IZW1g. Specify a valid FileItem.
What we need is a query that will help us to distinguish between file and folder.

0 votes



One answer

Permanent link
You cannot determine if the remote item is a file/folder/symlink using the scm cli. Please raise an enhancement request.

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 12,023

Question asked: Dec 02 '14, 11:19 a.m.

Question was seen: 2,981 times

Last updated: Dec 02 '14, 11:55 p.m.

Confirmation Cancel Confirm