Home » Developer & Programmer » Forms » Read file name in linux server from windows client (Oracle 10g)
Read file name in linux server from windows client [message #409243] Sun, 21 June 2009 01:32 Go to next message
sathyanambady
Messages: 10
Registered: September 2007
Location: Oman
Junior Member

Hi,
Could anyone tell me how to read a file name from 10g forms which is compiled in Linux and the directory to be read is in linux, not in windows.
The file name consists of
static name, DDMMYYYY HHMISS.

The problem here is how to read the HHMISS.
I tried using webutil_file.directory_list, but it can read only client directories, not host.
I tried host command with ls command inside host command.
But, how do we pass the value of the ls command to a variable to display it in the application.

Anyone, please advice.
Re: Read file name in linux server from windows client [message #409511 is a reply to message #409243] Tue, 23 June 2009 00:00 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Look at the routines that have 'client_' as their prefix.

David
Re: Read file name in linux server from windows client [message #409514 is a reply to message #409511] Tue, 23 June 2009 00:10 Go to previous messageGo to next message
sathyanambady
Messages: 10
Registered: September 2007
Location: Oman
Junior Member

Hi David,

Sorry, but I didn't understand your reply. Which routines I need to check.
My forms 10g application is configured in Linux server, and I am running the form from windows. I need to read the files from a specific directory in server, not from the client. The file names are not static.Keeps changing with as HHMISS is suffixed to the file names.
How do I read these file names?
Re: Read file name in linux server from windows client [message #409546 is a reply to message #409514] Tue, 23 June 2009 01:35 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
What result do you get from a 'webutil_file.file_open_dialog' call?

David
Re: Read file name in linux server from windows client [message #409554 is a reply to message #409546] Tue, 23 June 2009 01:56 Go to previous messageGo to next message
sathyanambady
Messages: 10
Registered: September 2007
Location: Oman
Junior Member

But, isnt webutil used for getting details from the client machine? In my case, I want to get the file details from the server itself where the file resides and where the 10g Application server is configured.
Re: Read file name in linux server from windows client [message #409560 is a reply to message #409554] Tue, 23 June 2009 02:07 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Open 'webutil.pll' in Forms Builder and have a look. It does LOTS of things.

David
Re: Read file name in linux server from windows client [message #409565 is a reply to message #409560] Tue, 23 June 2009 02:17 Go to previous messageGo to next message
sathyanambady
Messages: 10
Registered: September 2007
Location: Oman
Junior Member

I am using Webutil for all other activities where client interaction is required. To get the details from the host, I tried using webutil_file.directory_list package. But, it doesn't work out for host directory details.
It details out only client side directory details. Its working fine when path is changed to the client pc instead of giving the server path.
Re: Read file name in linux server from windows client [message #409749 is a reply to message #409565] Tue, 23 June 2009 19:31 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Have you tried utl_file or text_io?

David
Re: Read file name in linux server from windows client [message #409796 is a reply to message #409749] Wed, 24 June 2009 02:16 Go to previous messageGo to next message
sathyanambady
Messages: 10
Registered: September 2007
Location: Oman
Junior Member

in text_io, whether wildcards can be used or not?
Becoz, the file name keeps changing due to the HHMISS.
Re: Read file name in linux server from windows client [message #410024 is a reply to message #409796] Wed, 24 June 2009 21:12 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Then do host('dir > my_dir.txt'); then do a 'text_io' or 'utl_file' on 'my_dir.txt' and work out which file to process.

David
Re: Read file name in linux server from windows client [message #410032 is a reply to message #410024] Wed, 24 June 2009 22:42 Go to previous messageGo to next message
sathyanambady
Messages: 10
Registered: September 2007
Location: Oman
Junior Member

Yes.I tried that. It is working with host and ls command and text_io.
But, I want to know, if there are any other alternatives or packages in 10g so that I can use that without going for host commands through application.
Re: Read file name in linux server from windows client [message #410048 is a reply to message #410032] Wed, 24 June 2009 23:37 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
I can only suggest that you do that which I have done previously.

Open 'webutil.pll' in Forms Builder and read the comments to every package, function, and procedure.

Under 'database Objects', for 'SYS', expand the 'PL/SQL Stored Programs Units' and read the comments to every package, function, and procedure.

Also download a copy of Oracle's "PL/SQL Packages and Types Reference, 10g Release 2 (10.2), B14258-01" and save it on your PC or thumb-drive for future reference.

David
Previous Topic: Ora-12154
Next Topic: how to block user at form level
Goto Forum:
  


Current Time: Sun Dec 04 06:47:29 CST 2016

Total time taken to generate the page: 0.09585 seconds