Quantcast
Channel: SCN : Unanswered Discussions - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 3719

Calling PowerShell script to download file in BODS

$
0
0

Hi Experts,

 

i am trying to download file by using Power shell script as below,

 

exec('powershell.exe','-NoLogo -Noninteractive -InputFormat None -NoProfile -ExecutionPolicy Bypass -Command (New-Object System.Net.WebClient).DownloadFile("ftp://ftp.ncdc.noaa.gov/pub/data/gsod/2013/gsod_2013.tar", "\\<Linked Dir>\gsod_2013.tar")',8));

 

but i am facing the below issue and if you run the same command  through command prompt it is working fine. so could you please help me out to solve this issue.

 

1303216140PRINTFN3/17/2016 7:38:52 AM0: Missing ')' in method call.  At line:1 char:48  + (New-Object System.Net.WebClient).DownloadFile( <<<<
1303216140PRINTFN3/17/2016 7:38:52 AMftp://ftp.ncdc.noaa.gov/  pub/data/gsod/2013/gsod_2013.tar, \\nasgfil3_1\sapbodserv_dev\Predictive_Order\
1303216140PRINTFN3/17/2016 7:38:52 AMWeather_Data\Actual_Temp_Inbound\gsod_2013.tar)      + CategoryInfo          : ParserError: (CloseParenToken:TokenId) [], Paren
1303216140PRINTFN3/17/2016 7:38:52 AMtContainsErrorRecordException      + FullyQualifiedErrorId : MissingEndParenthesisInMethodCall
1303216140JOB3/17/2016 7:38:52 AMJob <Job_POC_DOWNLOAD> is completed successfully.

Viewing all articles
Browse latest Browse all 3719

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>