cancel
Showing results for 
Search instead for 
Did you mean: 

OS command needed

Former Member
0 Kudos

Hi SAPStars,

In XI File Adapter, we want to generate empty file after processing the message using OS command.

The empty file have to be generated in specific path..

what is the command that we need to fill in for this purpose?

I have used OS command Touch <file-name>

It says OS command executed successfully but dont know where this file getting created I wanted the file to be generated in specified path...

Do anyone know, how to create a file in specified path?????

Thanks in Advance.

Harikrishna

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Hari,

The below link will tell you how to call operating system command using file adapter 'Run Operating System Command Before/After Message Processing' to meet a requirement where file adapter need to place newly created file on two separate target directories instead of only one.

Hope the below will help you.

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/xi/sapXIFileAdapterOSCommandLine+Feature

Regards,

Leela

Former Member
0 Kudos

Hi Hari

I think for using UNIX Touch these are the alternate commands i found.

touch [  -a ] [  -c ] [  -m ] [  -f ] [  -r RefFile ] [ Time |  -t Time ] { File ... | Directory ... }


-a	Changes the access time of the file specified by the File variable. Does not change the modification time unless -m is also specified.
-c	Does not create the file if it does not already exist. No diagnostic messages are written concerning this condition.
-f	Attempts to force the touch in spite of read and write permissions on a file.
-m	Changes the modification time of File. Does not change the access time unless -a is also specified.
-r RefFile	Uses the corresponding time of the file specified by the RefFile variable instead of the current time.
Time	Specifies the date and time of the new timestamp in the format MMDDhhmm[YY], where:
MM
Specifies the month of the year (01 to 12).
DD
Specifies the day of the month (01 to 31).
hh
Specifies the hour of the day (00 to 23).
mm
Specifies the minute of the hour (00 to 59).
YY
Specifies the last two digits of the year. If the YY variable is not specified, the default value is the current year.
-t Time	Uses the specified time instead of the current time. The Time variable is specified in the decimal form [[CC]YY]MMDDhhmm[.SS] where:
CC
Specifies the first two digits of the year.
YY
Specifies the last two digits of the year.
MM
Specifies the month of the year (01 to 12).
DD
Specifies the day of the month (01 to 31).
hh
Specifies the hour of the day (00 to 23).
mm
Specifies the minute of the hour (00 to 59).
SS
Specifies the second of the minute (00 to 59).

Thanks

Gaurav

Edited by: Gaurav Bhargava on Oct 29, 2008 10:03 AM

Former Member
0 Kudos

Hi

What command are you using to create a file. Try scrip like this

cat > filename.txt directory

Thanks

Gaurav

Former Member
0 Kudos

Sorry,wrong post

Edited by: Aamir Suhail on Oct 28, 2008 11:04 PM

Former Member
0 Kudos

Try using the following

C:\<pathYouWant> touch filename

Thanx

Aamir