Skip to Content
0
Former Member
Oct 05, 2009 at 11:41 AM

Issue with OS Command to handle multiple files in File Adapter

25 Views

Hi,

A separate process creates a couple of files on PI file system (say Message_1.tmp, Message_2.tmp and so on).

In my scenario, I when I create a target file using receiver file adapter, these tmp files should be renamed to .xml or be deleted. I am using two separate file adapters for renaming and deletion.

In either case, if I use wildcards like *, it does not work.

i.e. the following OS command

rm /path/Message_1.tmp

deletes the file Message_1.tmp

but the command

rm /path/Message_*.tmp

does not work. I need a command that can delete all .tmp file starting with "Message_".

Same issue is with renaming files.

mv /path/Message_1.tmp /path/Message_1.xml

works but

mv /path/Message_*.tmp /path/Message_*.xml

does not work.

Any help is highly appreciated.

Thanks.

Regards,

Riyaz