Home » SQL & PL/SQL » SQL & PL/SQL » URGENT-counting the number of OS files of particuler type(extension) in a directory(windows)
URGENT-counting the number of OS files of particuler type(extension) in a directory(windows) [message #184590] Thu, 27 July 2006 03:01 Go to next message
salman2k960
Messages: 12
Registered: September 2005
Junior Member
aoa
how can i determine the number of say *xyz*.txt files in a directory?
actually, i am asking user to select a file by using
"get_file_name" built-in. i open this dialog box with a filter of type "*xxx*.txt". now what i want is that the dialog box should not open if no file is found after applying the filter.
hope 2 c a answer soon.
maani
Re: URGENT-counting the number of OS files of particuler type(extension) in a directory(windows) [message #184618 is a reply to message #184590] Thu, 27 July 2006 04:23 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10672
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
Within pl/sql, you need some Java/oci routines to do this.
If "get_file_name" has to do something with forms,
Please post in forms forum. May be someone could help there.

PS:
A post with title "URGENT" may produce some "SLOW RESPONSE".
Fact is, if it was so-urgent, you should have contacted oracle support.
>>hope 2 c a answer soon
You are Lucky. Maaher is on vacation.Smile
To get better response, please avoid using IM style language here.

Re: URGENT-counting the number of OS files of particuler type(extension) in a directory(windows) [message #184643 is a reply to message #184618] Thu, 27 July 2006 05:23 Go to previous messageGo to next message
salman2k960
Messages: 12
Registered: September 2005
Junior Member
first of all, thanx alot Mahesh Rajendran. I will try to follow you suggestions. Cool
As far as the solution to my problem is concerned, i have developed another workaround for DOS using host command as follows:

host('dir /o /b "c:\temp\*.txt" | find "" /c /v > "c:\temp\count.txt" ')

this command will create a file "c:\temp\count.txt" containing the number of files of type txt.Read this file using text_io package and enjoy. Note that u can change the argument to dir command as well as destination file.
maani
Re: URGENT-counting the number of OS files of particuler type(extension) in a directory(windows) [message #186959 is a reply to message #184643] Thu, 10 August 2006 05:26 Go to previous messageGo to next message
prase_pk
Messages: 40
Registered: July 2005
Location: india
Member
Can you please tell me how to use the same command for UNIX if logging from a remote system with user name and password.

Re: URGENT-counting the number of OS files of particuler type(extension) in a directory(windows) [message #187070 is a reply to message #186959] Thu, 10 August 2006 14:40 Go to previous message
andrew again
Messages: 2577
Registered: March 2000
Senior Member
To run a command on a remote machine, you can try rexec, rsh or remsh. With some of them you has edit the .rhosts on the remote machine to allow you to come in without passwd.

then...
ls *xyz*.txt | wc -l
Previous Topic: Insert value 'G&D PREPAGO' doesn`t work
Next Topic: How do I convert an array in a string into rows?
Goto Forum:
  


Current Time: Sat Dec 10 11:06:30 CST 2016

Total time taken to generate the page: 0.19580 seconds