Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8453

Re: file Adapter "run operating system command"

$
0
0

Hi Jonny,

 

You can write a shell scripting file to unzip the file. And placed it into some location on the SFTP server.

 

At Receiver adapter OS command line you just need to provide the path of the script first, name of the file to be unzipped and then the path where you want to place the file.

 

The OS command line should look like this:

 

sh -x /<Location where the script is places in server>/<FileName_to_unzip_the_file.sh> <File which is to be unzipped> /<Target location >/

 

Script should be like this:

******************************************************************************

_FileName=$1

_FilePath=$2

 

cd $_FilePath

 

unzip $_FileName $_FileName.zip

 

chmod 777 $_FileName  (Use this if you dont have the proper permission)

 

rm $_FileName.zip                   (If you want to delete the zipped file use this command)

 

***************************************************************************************

 

P.S.: "<FileName_to_unzip_the_file.sh>" here .sh is the extension that is to be given to the script file which would unzip your file, as this is a shell scripting.

 

Hope this would help you.


Viewing all articles
Browse latest Browse all 8453

Latest Images

Trending Articles



Latest Images

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