Power User Google Syncing with Syncdocs

We’re often asked how to automate tasks with Syncdocs. Using the command line with Syncdocs, you get more control over your Google Docs account.

You can:

  • create a batch file to backup for a specific user
  • call Syncdocs from another program to upload a file or folder
  • share a folder with others
  • view a local file in Google Docs viewer
  • control Google Docs via a script
  • automate deployment

Syncdocs is controlled via the command line with these options:

Command line options

Automatic Deployment and Account pre-configuration

For administrators who want to deploy and pre-configure Google Drive to their users, there’s an automated deployment guide. This describes command line options useful for deployment like:

-syncfolder -oauth -user -password -iacceptterms

Run once only

If you wish to run Syncdocs only once, for backup purposes, say once a day, you can add an item to the Windows scheduler.

The Syncdocs command line option to run once is –OnlyRunSyncOnce

This option is not case sensitive.

Standard shell error reporting is supported, exit code 0 means no problems, 1 a serious error.

Specifying another user

You can specify another user for Syncdocs with the –u or –user option.

The syntax is:

   syncdocs.exe –u my_other_account@gmail.com

This will start Syncdocs with this user’s Syncdocs credentials and settings, the same as switching users in the Preferences menu.

If the user specified does not exist, then Syncdocs will ask the user for their details. If Syncdocs is already running, accounts will not be switched.

This can be useful for deployment.

If you use multiple accounts, you can create desktop shortcuts for each account using this command line.


Live command line options

The options below work fastest when Syncdocs is already running and synced. If Syncdocs is not running, it will take a few (5-60) seconds to log in first, before processing your command.

Creating new files

To create a new document on Google Docs:

     syncdocs.exe create doc

In general the syntax is:

  syncdocs.exe create [doc|sheet|presentation|email|calendar]

to create the new type you wish in a web browser on Google Docs.

Uploading existing files

To upload an existing file (of any type) from your PC to Google Docs:

  syncdocs.exe upload “C:\path\filename.ext”

If exactly the same file (based on contents, file name and time) is already on Google Docs, then the file is not uploaded again. If the file is uploaded, it is uploaded to the “Direct Uploads” collection on Google.

To view a file

Similar to uploading a file, to view a file in Google Docs using the default web browser:

syncdocs.exe view “C:\path\filename.ext”

Google supports viewing:

  • Office 2007/2010 .docx, .xlsx, pptx
  • Office 95-2003 .doc, xls, ppt, pps
  • Open/Libre Office/Open Document Format .odt, ods
  • Apple pages.
  • .pdf, .xps
  • most image formats: .jpg, .bmp, .png
  • vector images: .ai, .dxf, .svg
  • postscript: .ps, .eps
  • fonts: .ttf
  • archives: .zip, .rar

see here for a full list

If exactly the same file is already on Google Docs, then the online version is used. If the file is uploaded, it is uploaded to the “Direct Uploads” collection on Google.


To open a file for editing

Similar to viewing a file, you can open a file for editing, if the file format can be edited and your current settings allow conversion to Google Docs.

  syncdocs.exe open “C:\path\filename.docx”

Only formats supported for editing will be opened (most MS Office and Open files and text files, see Conversion section of FAQ for more).

If the file cannot be opened, it will be opened for viewing.


To share

Similar to uploading a file, to share a file in Google Docs

  syncdocs.exe share “C:\path\filename.ext”

If exactly the same file is already on Google Docs, then the online version is used. If the file is uploaded, it is uploaded to the “Public Share” or “Direct Uploads” collection on Google, depending on whether it is shared publically, or just to specific users and groups.


You can share entire folder trees in the same way:

  syncdocs.exe share “C:\path\folder\”

Note the trailing slash “folder\”.  Syncdocs will upload the whole folder tree on the next sync, if it is not already on Google.

8 Responses to Power User Google Syncing with Syncdocs

    • admin says:

      Yes, you can select which Google Drive folders to sync in the Syncdocs Preferences menu.

      Do you wish to upload everything to the contents of one folder to one Google folder?

  • Innocenzo Daraio says:

    I must evaluate if Syncdocs is the correct solution to develop a service for my customer.

    I must sync many different account from the same server. Each of this account to the specific google drive folder.

    My needs are :
    1) sync a collection of UNC shared folder. Each folder with a their specific google account. Multiple pair.
    2) Setup a couple of istance of syncdocs and for each istance i want to sync a collection of account
    3) sync the folder with a specific subfolder of the Google Drive account and not the entire google drive.
    4) I must add account to sync at any time and update their credential. Can i add or update programmatically an account without reinstall syncdocs ?
    5) is the secret the google account password or other ?

    I know that it is an extreme scenario but is what i need.
    Thanks a lot.

    • admin says:

      Broadly, you can do this with Syncdocs and Google Drive.

      To answer specific questions:
      1. Yes, just right click on the UNC share and select “Upload to Google Drive” with Syncdocs.
      If you want to automate this process, see this automated Google Drive installation guide.
      2. Each instance of Syncdocs syncs a specific account. You can run multiple instances at the same time for multiple accounts. This keeps each account’s data separate.
      3. You can select which folders sync in the folders menu.
      4. Syncdocs is not tied to install-time credentials. You can set it up at installation, or use the OAuth option which requires no password storage.
      5. It can one of many options. Take a look at the “Google Drive Security and Privacy” section of our help.

Leave a Reply

Your email address will not be published. Required fields are marked *