Powershell command using tSystem

Six Stars

Powershell command using tSystem

Hi,
Can you please guide me on the issue.
I need to upload a file to a site. I am using ySystem component to run the powershell.
I get escape character error. I am not able to resolve it.

Below is my command:

 

"cmd /c start powershell -noninteractive C:\\Curl_windows\\src\\curl.exe -H 'X-API-TOKEN:ZLQuFZWY5zekZd' -F 'surveyId=SV_8dpoD2nJ3' -F 'file=@C:\\Logs\\surveyresponseimport.csv;type=text/csv' 'https:\/\/xxx.com\/API\/v3\/responseimports'"

Where am i going wrong?


Accepted Solutions
Six Stars

Re: Powershell command using tSystem

hi,

 Change the slashes from \\ to //


All Replies
Six Stars

Re: Powershell command using tSystem

hi,

 Change the slashes from \\ to //

Highlighted
Six Stars

Re: Powershell command using tSystem

oh God!! This was the culprit ..Thanks a lot

Six Stars

Re: Powershell command using tSystem

Hi, this command works fine when I run it through talend:

"cmd /c start powershell -noninteractive C://Curl_windows//src//curl.exe -H 'X-API-TOKEN:qEa9E1nqZWY5zekZd' -F 'surveyId=SV_8dpqGnJ3' -F 'file=@C://VocalCom//surveyresponseimport.csv;type=text/csv' 'https://qualtrics.com//API//v3//responseimports'"

 

But when I deploy the job and run through karaf, the command is unable to upload the file. 

 

Could you please suggest any alternative?

 

 

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now