Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

wait_for_file() not working for certain file names

Data Services Version:

OS: Windows Server 2003.


I'm using wait_for_file to poll for files in a certain directory. I've used this in the past for other projects and never had an issue until now.

What seems to be happening is with certain file names, wait_for_file is returning a 1 (meaning at least one file found), however the file list is coming back as blank.

For example:

If I put a file name called cs.p.P110113CN.b.110114 in the directory, I get a blank return file list.

If I then rename this to 110114, it works fine.

Here's the code I'm using:

wait_for_file($GV_InputDirectory || '*',0,0,1,$GV_InputFileName);

$GV_InputDirectory varchar(1000)

$GV_InputFileName varchar(100)

Any ideas why this might be happening? Renaming the file isn't really an option as it's a standard format that we've used for years.

Edited by: Craig Cartmell on Mar 7, 2011 11:16 AM

Former Member
Not what you were looking for? View more on this topic or Ask a question