Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

Execute a batch File .bat

$
0
0

Hi,

I have a job server running in server1(eg) and my designer is running in server2(eg).

I have a batch script to ftp a file from another server3(eg)

But the Batch File is dependent on a txt file to execute which is set inside the batch file.

 

Say both the batch file and the txt script are in the same folder where the job server is running.

 

When i double click on the batch file it works perfectly.

I try to use that in DI it doesn't

 

exec('C:\Documents\a.bat', ' ' ,8);

It does not throw me any error but it does not fullfill the operation

I tried

exec('cmd','C:
Documents
a.bat',8);

I changed the flag to 0 and it throws me an error

 

failed, due to error <50306>: <Function <exec> failed to execute program <CMD

                                                     <cmd,C:\Documents\a.bat,0>. Program terminated with exit code <2>.>.

 

Can u help me out with this.


Viewing all articles
Browse latest Browse all 4013

Trending Articles



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