Does anyone here have experience with the CLI ? I’...
# sdf
a
Does anyone here have experience with the CLI ? I’m trying to import objects and it isn’t working even when putting in the parameters as they should be
e
Can you help us better understand "isn't working"? What have you tried? What error are you seeing?
a
I feel like I have tried every combination I can think of on this thing. But in powershell trying `suitecloud object:import —type restlet —scriptid “customscript_this_is_a_test” —destinationfolder “\src\Objects\”
I have also tried doing just “ALL” under type and script ID
The error I keep getting is ‘Option “scriptid” must be specified’
e
What happens if you just run it in interactive mode?
suitecloud object:import -i
a
What I’m trying to do is create a powershell script that would auto import the files from production so I can update my master GitHub branch more regularly.
Interestingly if I do
suitecloud object:list
it works just fine with all the same parameters
It is just import for some reason that hates working
watching following 1
According to that you can only do one file at a time in non-interactive mode, which is fine I can loop through after doing a list in a script, but it isn’t working as it should
e
Actually I am about 90% sure you can do
--scriptid customscript_obj1 --scriptid customscript_obj2 ...
so long as everything matches the
--type
you specify
r
something like this should work
suitecloud object:import --type ALL --destinationfolder /Objects --scriptid <scriptid1> <scriptid2> <scriptid3>
e
This
Copy code
--scriptid <scriptid1> <scriptid2> <scriptid3>
just needs to be
Copy code
--scriptid <scriptid1> --scriptid <scriptid2> --scriptid <scriptid3>
and that should work
a
I can’t get just 1 to work though
r
I think they both work, although the first way i think needs the --scriptid at the end
a
—scriptid <scriptid1>
isn’t working at all.
Oooo let me try that
Nope
error: option ‘—scriptid <arguments…>’ argument missing
r
you have 2 dashes there right? In what you pasted there is only one
a
I did use 2, sorry I am using slack on a different machine. Security 😛
r
its strange, the only way I get that error is just not having anything after the --scriptid arg. Otherwise it works fine
a
Does it matter what folder you do it from ?
I still keep getting the same error
Copy code
The following objects failed with reason “Option “-scriptid” must be specified.”: 
    - customscript_this_is_a_test
r
whats the full command you have now?
a
That exactly, except for the script it. I’m sure the script ID is good since I can list it. And the
-scriptid
does have 1 dash there
Copy code
suitecloud object:import —type ALL —destinationfolder “\Objects\” —scriptid customscript_this_is_a_test
r
that works fine for me once I switch all the dashes to 2 dashes. I'm not on windows though, maybe something weird with powershell
a
Stupid windows
HA! GOT IT for what it matters, when you do it in interactive mode, it gives you the command to do it in non-interactive mode. I needed to include
—excludefiles
and it works