cancel
Showing results for 
Search instead for 
Did you mean: 

FTP File Adapter: more Archive Directory

Former Member
0 Kudos

Hello everybody,

i have some interfaces whit FTP-XI-Idoc scenarion.

we decided to save files after elaboration in different directory depending on month (yy-mm).

Example:

/Rxarchivio/0901

/Rxarchivio/0902

....

I see this link

https://wiki.sdn.sap.com/wiki/display/XI/SAPXIFileAdapterOSCommandLine+Feature

very helpfull but i don't know how to parameterize variable of year and month.

i try with this but don't work:

SET CC=%DATE:6,4%%DATE:3,2%

open ftp

VCE01\selzsapd

dpas_zles

cd /Rxarchivio

mkdir %CC%

mget

cd /Rxarchivio/%CC%

mput

quit

any suggestion?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey,

Scenario is fine. Your unix script is wrong. Just try this script in Putty wether it is working fine or not.

Thanks and Regads

Aman

Former Member
0 Kudos

but my FTP server is in windows and not unix

is the same?

Former Member
0 Kudos

Hi,

I m not taking about FTP server. Your PI is on Windows or Unix.

Id it is on UNIX the put the UNIX script to PI file system and give the path.

FTP adapter pick the file from FTP location and the pick the UNIX script from PI FIle system and run script ..archive the files and then send message for further processing.

Thanks

Aman

Former Member
0 Kudos

my PI in on windows

not in unix

i'm triin to call the scrit from Command promt but mget and mput don't work

Former Member
0 Kudos

ok now mget and mput are working.

but i cannot have year and month?

maybe i need calculate it on bat file and pass to script when i call him???

Answers (0)