"Invalid switch" error when running studio from the command line

I was delighted to discover I can run Studio from the command line. Will speed up my workflow no end if I can get it to work, as I have to create lots of single-file projects from different locations as part of my institution's workflow. But I get an "Invalid switch" error. I followed the instructions at docs.sdl.com/.../GUID-26FC92FB-38BA-4AC8-9DE2-D017C687E746 (but changing the "Studio4" folder to "Studio5", as per my version). It's finding the SDLTradosStudio.exe file, but it doesn't like the openDocument switch. I've tried with and without quotation marks around the file I want to translate. The /help switch is working, and the window that opens shows the /openDocument switch, but I can't get it to work. I just get "Invalid Switch". Please advise.

Parents
  • I've never tried this before, so I had a quick play and after failing as you described I see what the problem might be.  Initially I had this:

    c:\Program Files (x86)\SDL\SDL Trados Studio\Studio5\SDLTradosStudio.exe /opendocument c:\Users\pfilkin\Documents\SDL\TESTING\Command line\shorttest.txt

    The error message showed things failed after Command, and this is where I had a space in the folder name.  So I replaced it with an underscore like this and it works:

    c:\Program Files (x86)\SDL\SDL Trados Studio\Studio5\SDLTradosStudio.exe /opendocument c:\Users\pfilkin\Documents\SDL\TESTING\Command_line\shorttest.txt

    I know the first part also has spaces, but it looks as though the switch doesn't like them.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Reply
  • I've never tried this before, so I had a quick play and after failing as you described I see what the problem might be.  Initially I had this:

    c:\Program Files (x86)\SDL\SDL Trados Studio\Studio5\SDLTradosStudio.exe /opendocument c:\Users\pfilkin\Documents\SDL\TESTING\Command line\shorttest.txt

    The error message showed things failed after Command, and this is where I had a space in the folder name.  So I replaced it with an underscore like this and it works:

    c:\Program Files (x86)\SDL\SDL Trados Studio\Studio5\SDLTradosStudio.exe /opendocument c:\Users\pfilkin\Documents\SDL\TESTING\Command_line\shorttest.txt

    I know the first part also has spaces, but it looks as though the switch doesn't like them.

    Paul Filkin | RWS Group

    ________________________
    Design your own training!

    You've done the courses and still need to go a little further, or still not clear? 
    Tell us what you need in our Community Solutions Hub

Children