batch file - yammer data export using windows code -
i try export data using data_export_api_code_1_windows
my reference link :
https://developer.yammer.com/docs/data-export-api
i'm using verified admin privilege account
i create .bat file , copy script on replace <access token>
admin token , <directory>
directory path files placed.
and install wget windows , update path environment variable include gnu bin path.
i'm using windows 10
but when run .bat open console , close without change , when try run cmd show image
-ca-certificatei discover windows code in yammer reference incorrect , has mistakes. correct mistakes in code , execute, run , download files. correct code after fixing
@echo off set at=<oauth access token> set dir=<export path> set exportsince=<datetime in iso- 8601 [2016-02-13t00:00:00z]> cd %dir% setlocal enabledelayedexpansion ::preform next export. send oauth 2 access token , store time of export in filename. set file_name=<[myfilename].zip> set auth_header=authorization: bearer %at% set api_url=https://www.yammer.com/api/v1/export if not exist cacert.pem ( wget http://curl.haxx.se/ca/cacert.pem ) echo downloading.. wget -o %file_name% -t 1 --header "%auth_header%" -ca-certificate cacert.pem %api_url%?since=%exportsince%^&include=csv echo finish download
Comments
Post a Comment