Darrel
silly

UPLOAD command via DMCLI

When we use DMCLI, we are unable to execute it with the UPLOAD command. It seems that DMCLI interprets the UPLOAD command as a file, and will return an error indicating I can't use and /Directory at the same time.

dmcli -user xxx-pass -host xxxx -dbname xxxx -dsn xxxx -cmd upload /DIRECTORY="somedir" /CHANGE_DOC_IDS=(SomeChangeID) /FORCE_CHECKIN /COMMENT="Some Comment"

But if we pass the exact same upload command from the "Dimensions>" prompt, it runs fine. Is there a syntactic difference when running the DMCLI with the -cmd option?
1 person has
this question
+1
Reply

  • You should enclose the whole command passed with -cmd parameter in quotes.
    Take a look on examples in "Command-Line Reference" PDF:
    If the command you are running contains double quotation marks in the qualifiers, you must wrap the entire command in double quotations, and 'escape' the double quotation marks in the command. For example:
    dmcli -user dmsys -pass dmsys -host myhost -dbname intermediate -dsn
    mydsn -cmd "CI \"PAYROLL:LICENSE2 DAT TXT.A-SRC;1\" /
    USER_FILENAME=G:\license.dat.txt /FILENAME=license2-dat-01.txt /
    PART=PAYROLL:PAYROLL.A;1 /WS_FILENAME=license2.dat.txt /
    DESCRIPTION=\"test test\" /FORMAT=TXT /
    ATTRIBUTES=(COMPLEXITY=lowish) /COMMENT=\"This is a test\" /
    CHANGE_DOC=(\"PAYROLL_CR_21\") /KEEP"
     Dimensions commands requiring quotation characters within the double quotations characters referred to above will require:
    • For Windows: three double quotation characters before the quoted string and three double quotation characters after the quoted string. For example:
    dmcli -con _tabuilder -cmd "EI """TA_DESKTOP:TEST TXT.BASESOURCE_
    INT""" /USER_FILENAME="""c:\temp\test.txt"""
    /PROJECT=TA_DESKTOP:INTERNAL /NOOVERWRITE"
    • For UNIX: single quotation characters before the command containing the quoted string. For example:
    dmcli -con _tabuilder -cmd 'EI "TA_DESKTOP:TEST TXT.BASESOURCE_
    INT"' /USER_FILENAME='"/usr/temp/test.txt"'
    /PROJECT=TA_DESKTOP:INTERNAL /NOOVERWRITE"
  • (some HTML allowed)
    How does this make you feel?
    Add Image
    I'm

    e.g. indifferent, undecided, unconcerned happy, confident, thankful, excited sad, anxious, confused, frustrated kidding, amused, unsure, silly