2 Replies Latest reply on Jul 22, 2017 2:06 AM by Kalyan Reddy

    Getting an error 406 not acceptable

    Kalyan Reddy

      Dear All,

      Could you please help me this regard and i am new to tabcmd commands . Below is the piece of code ( not written by me ) which is working fine and started giving trouble

      from last 2 days . Its throwing an error "406 Not Acceptable" . This code is written download the twbx files .Could you please help me what went wrong suddenly. Thank you so much in advance




        setlocal enabledelayedexpansion

        REM tabadmin dbpass production

        REM type nul >%TIME:~0,2%%TIME:~3,2%%TIME:~6,2%.txt


        if exist "C:\TSBatch\WorkbooksList.csv" (

          echo y | del "C:\TSBatch\WorkbooksList.csv"



        if exist "C:\TSBatch\ViewsList.csv" (

          echo y | del "C:\TSBatch\ViewsList.csv"



        if exist "C:\TSBatch\Tableau\" (

          rd /s /q "C:\TSBatch\Tableau\"



        set serverName=http://**.***.**.**/

        set userName=userid1

        set passWord=pwd1


      REM set userName=userid2

      REM set passWord=pwd2

        set cdate=%Date:~10,4%%Date:~4,2%%Date:~7,2%


        tabcmd logout

        tabcmd get "/views/TableauWorkbooksList2/WorkbooksList.csv" -f "C:\TSBatch\WorkbooksList.csv" --server %serverName% --username %userName% --password %passWord%

        tabcmd get "/views/TableauWorkbooksList2/ViewsList.csv" -f "C:\TSBatch\ViewsList.csv" --server %serverName% --username %userName% --password %passWord%


        set InputFileWB=C:\TSBatch\WorkbooksList.csv

        for /f "tokens=1-3 delims=," %%A in ('type "%InputFileWB%"') do (


          set workbookname=%%A

          set projectname=%%B

          set fileServerLoc=%%C


          if not exist "C:\TSBatch\Tableau\!projectname!\!workbookname!\" (

            mkdir "C:\TSBatch\Tableau\!projectname!\!workbookname!\"



          tabcmd get "/workbooks/!workbookname!.twbx" -f "C:\TSBatch\Tableau\!projectname!\!workbookname!\!workbookname!.twbx" --server %serverName% --username %userName% --password %passWord%


      copy /y "C:\TSBatch\Tableau\!projectname!\!workbookname!\!workbookname!.twbx" "!fileServerLoc!\!projectname!\!workbookname!\!workbookname!.twbx"