cancel
Showing results for 
Search instead for 
Did you mean: 

OS Command Receiver PI Channel

Former Member
0 Kudos

I am using Dynamic FIle Configuration for my interface both for File Name and DIR. ECC send meassages in mulitple chunks and I am creating the file in append mode.

The last message that ECC send has a  flag set so that I can trigger another file channel to change the temp file name to permanent file name. This channel also has the same file name and dir name through Dynamic Config.

The command I am using to rename the file

cmd.exe /C ren %F FOGPM03_ FOGPM03_A

However it does not do anything.

Accepted Solutions (1)

Accepted Solutions (1)

former_member194612
Active Participant
0 Kudos
Former Member
0 Kudos

Can I rename the file without using script. I want to put a command directly in the channel not by invoking a script.

As we are on AIX, I am using the following:

mv command instead of ren or rename.

I am using mv %F %F.FINAL to append FINAL to the existing file name when I receive the last message. Now everything works as expected. Now the only frontier is how to add the timestamp to this.

Another thing is. Like SAP provides %f and %F for filenames. Do we have anything for directory path as well like %dir or %d?

baskar_gopalakrishnan2
Active Contributor
0 Kudos

You can follow this link for appending timestamp to the filename..

http://xmodulo.com/2013/02/how-to-append-current-date-and-timestamp-to-filename-in-shell-script.html

>Another thing is. Like SAP provides %f and %F for filenames. Do we have anything for directory path as well like %dir or %d?

IMO, answer is no

Answers (0)