cancel
Showing results for 
Search instead for 
Did you mean: 

Wildcard in filename

Former Member
0 Kudos

I have a requirement. I have to send all the files in a particular directory to a reciever for which I am giving file name parameter as

'*.pdf' and a valid source directory from which to select the files.

There are some 700 pdf files to transfer.

The interface fails when it hits a file, which has '' in its filename. Something like AS_20090218.pdf.

The communication channel gives SAP Illegal Argument Exception. But I need to transport this file as it is to the receiver with the same filename. I have tried mostly all the combinations of wildcards and Advanced Source Selection options in the file adapter with no use.

Evidently, it considers the use of '' in the file name an error condition when '.pdf' is used to give the file names.

Has anybody come across any problem like this? If so, what is the way to solve this?

Thanks,

Rashmi.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

In unix you can load it with --> ls \*

I've tried it.

So, you can create a shell that rename this kind of files and call it with a remote shell in your cc.

After being renamed these files would be picked up at the next poll interval

Regards,

Carme

Answers (5)

Answers (5)

Former Member
0 Kudos

Could not find any good solution to this. Asked the enduser to change the filename.

former_member208856
Active Contributor
0 Kudos

Characters (? / : * < >) etc. are not allowed in File name.

Delete these characters in File name & process.

Former Member
0 Kudos

Hi Rashmi,

Did u try with the file name as, *.pdf... this should take all the files with .pdf extension.

Lemme make sure whether u have given '*.pdf' or *.pdf

if it's .pdf all files will be read with extension .pdf including abc.pdf , *.pdf n, .pdf also.

If ur requirement is like abc*.pdf, means abc and anycharacter compulsory then .pdf use abc?.pdf

If still problem occurs, please respond with the problem in detail

Babu

Former Member
0 Kudos

Hi,

Yah I have tried with *.pdf .

It does not pickup the filename which has * in it. This is the error message I get in communication channel when trying to do this.

Could not process file 'A720090731CO.pdf': com.sap.exception.standard.SAPIllegalArgumentException: The parameter "argument" has the value "A7_20090731_CO.pdf", so it contains the character "A7*_20090731_CO.pdf" which is not allowed

Lemme make sure whether u have given '*.pdf' or *.pdf

Does giving the filename in inverted commas e.g, '*.pdf' make any difference?

Is there any escape character we can use for such cases or any use of exclusion mask or filemask in advanced source selection help?

Thanks,

Rashmi,.

Edited by: Rashmi Joshi on Feb 18, 2010 1:44 PM

stefan_grube
Active Contributor
0 Kudos

> If so, what is the way to solve this?

Rename all files and tell the provider of the files, that * in the file name is not allowed.

former_member181985
Active Contributor
0 Kudos

How can file name contain * ?

Its not possible.

Former Member
0 Kudos

Hi Praveen,

Yah even we thought so, but it does exist and has to be processed by the interface.

Any help please.

Thanks,

Rashmi.

former_member181985
Active Contributor
0 Kudos

I just tested, We can create a filename with * in UNIX environment.

Former Member
0 Kudos

Yes Praveen.