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. |
One answer
You cannot determine if the remote item is a file/folder/symlink using the scm cli. Please raise an enhancement request.
|
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.