Reading Files in a folder.

EarlWalker

Member
I'm using B9600471 to read csv files from a folder. Works on a fat client.

Question:
1) I'm guessing it will work on a the Enterprise server Win2008r2? (Server build is a couple of days away) Is it safe to do so?

2) It uses _tfindfirst to fetch the first file name then _tfindnext to fetch subsequent. However I don't see a _tfindclose available (in B9600471 or any other function) to release the handle. If I use _tfindnext to read all the files, does that mean the handle is automatically released?

Any help much appreciated.
 
That is a client only function, so you would have to change the flag to get it to attempt to compile on the server. Being a windows server, it *should*. The solution just wouldn't be supported by Oracle, I imagine.

Those functions (findfirst, findnext etc.) are Windows APIs to search/traverse a file system.

Craig
 
What Craig suggests is exactly what we did, but we cloned the BSFN (B5900471) and modified the clone to be both client and server. That way if Oracle changes it down the road, we run less risk in having it removed from the server.
But the real reason I'm chiming in on this thread is that earlier this week, for us the input path string seems to accept only one * wild card. C:\*.* no longer works, but C:\*.bar and C:\foo.* still do. I suspect a Windows update may be to blame. There's another very recent thread in the EnterpriseOne Technical forum that talks about grid problems that might be related to this.
 
I've working with restrictions here - the customer would prefer me not to create any new BSFN's (or coping them) . I'm assuming changing the Client/Server flag would be out of the question as well.

And yes I will need a double wild card so I'm not going to lump them with potentially a a future problem after I'm gone.

I've decided to do it a whole different way.

Much thanks folks.
 
Earl,

If I understand your requirements properly:

Have a look at the thread link below. It should give you ideas on how to accomplish your task. Use the host operating system to do the search work and put the results in a text file. Then use JDE to read the text file to retrieve the file names and then read the actual files.

https://www.jdelist.com/vb4/showthread.php?t=43135
 
Do you want to get and read the CSV content or just see if it's there?

Do you know what thew file names maybe before you look at all?

As there is a Check for File BSFN B0500725. I use it a lot to go and get attachments or completed jobs CSVs for FTP movement etc. Works great but you need to know the exact file name
 
Back
Top