How to read the name of .csv file from a particular folder using Oracle.

Gurus,
I have a folder called 'data_dir' in Oracle Server and it contains 10 different .csv files and the name of the each file is being suffixed by date and time(24 hrs format).
First i need to read all the file names then i have to process those files by UTL_FILE to load the data into a relational table.
Is there any mechanism is available in Oracle to read the file names?
(In this case all the 10 different csv file names)
If so, then please help me accomplish this.
Thanks in advance.
Regards,
Venugopal.K

Is there any mechanism is available in Oracle to read the file names?Sounds to me like you need to use External Tables (*not* utl_file).
http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/et_concepts.htm

Similar Messages

  • How to read the contents of XML file from my java code

    All,
    I created an rtf report for one of my EBS reports. Now I want to email this report to several people. Using Tim's blog I implemented the email part. I am sending emails to myself based on the USERID logic.
    However I want to email to different people other then me. My email addresses are in the XML file.
    From the java program which sends the email, how can I read the fields from XML file. If any one has done this, Please point me to the right examples.
    Please let me know if there are any exmaples/BLOG's which explain how to do this(basically read the contents of XML file in the Java program).
    Thank You,
    Padma

    Ike,
    Do you have a sample. I am searched so much in this forum for samples. I looked on SAX Parser. I did not find any samples.
    Please help me.
    Thank you for your posting.
    Padma.

  • How do I determine the name of a file from a watched folder

    I would like to generate a log to track the names and outcomes of files processed from a watched folder.  I don't see a way to access the name of the file from within the process.  I have a variable "inPDF" which is data type "document" and "outResult" which is type "xml" but I don't see a way to access the file name (or path) of the "inPDF" "document" object.  Is there a way to access the file name and path?

    Thank you, this sounds promising.
    Where can I find documentation describing the attributes that can be retrieved using the getDocumentAttribute function?  Also, where can I find a complete reference on the Document object?
    Best Regards,
    Noam

  • How to read the contents of a file from batch file

    Hi
    I have a text file which contains exe files.  I need to read those exe file names and then execute the same in order they occur. Sample content of the text file a.txt is as below.
    "If you are looking at previous version then use 8792xINT.EXE if you are looking for the current version then check 8793xINT.exe
    please use README.TXT file before you use any above files" 
    I need to read and execute 8793xINT.exe from above text in batch file.  Here number 8793 is variable changes as version changes but xINT.exe is constant.
    Thank you in advance
    DBC
    DBC

    Sorry... 
    code i use is here -
    strScriptFile = Wscript.ScriptFullName ' C:\Patch\test_download3.vbs
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    Set objFile = objFSO.GetFile(strScriptFile)
    strFolder = objFSO.GetParentFolderName(objFile) 
    Set objShell = CreateObject("WScript.Shell")
    strLink = "http://dbc.download.com/patches/" 
    strSaveTo = "C:\patches"
    objShell.CurrentDirectory = strSaveTo
    objShell.Run Quotes(strFolder & "\wget.exe") & " " & Quotes(strLink) & " -N",1,True
    objShell.CurrentDirectory = strFolder
    Function Quotes(strQuotes)
    Quotes = chr(34) & strQuotes & chr(34)
    End Function
    the above code geneates index.html.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
    <HTML>
     <HEAD>
      <TITLE>Index of /140410/patches/</TITLE>
     </HEAD>
     <BODY>
    <H1>Index of /140410/patches/</H1>
    <PRE>   <A HREF="?N=D">Name</A>                              <A HREF="?M=A">Last modified</A>        <A
    HREF="?S=A">Size</A>  
    <HR>
    <IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="..">Parent Directory</A>                  12-Oct-2014 16:25     1k  
    <IMG SRC="/icons/generic.gif" ALT="[FILE]"> <A HREF="8792KB.exe">8792KB.exe</A>                      18-Oct-2014 1:19  6.4M  
    <IMG SRC="/icons/generic.gif" ALT="[FILE]"> <A HREF="8793KB.exe">8793KB.exe</A>                      18-Oct-2014 2:19  4.2M  
    <IMG SRC="/icons/dir.gif" ALT="[FILE]"> <A HREF="2834KB.exe">2834KB.exe</A>                      20-Oct-2014 16:18  2.5M  
    <IMG SRC="/icons/dir.gif" ALT="[DIR]"> <A HREF="extra/">extra/</A>                            17-Sep-2013 23:09     1k  
    <IMG SRC="/icons/generic.gif" ALT="[FILE]"> <A HREF="readme.txt">readme.txt</A>                        30-Jan-2012 11:54    20k  
    </PRE><HR>
    </BODY></HTML>
    From above generated index file and re run the above script to in loop to download the exe files in c:\patches and deploy the same with schedule task on the PC in our Isolated ODC. Number of exe files this time only 3 exe.  I am using counter to loop
    the down load. 

  • How to read the complete path in file upload UI

    Hi,
    I want to know how to read the complete path in file upload UI in java web dynpro.
    I have created 1 file upload UI and than when i do browse and select some file say small.jpg from my local PC, desktop , its path is coming in file upload UI like E:\small.jpg,
    I want to know how to get this path in java webdynpro code.
    please let me know..

    Hi Satyam,
    In webdynpro java, first file stores in server location then it reads from server.
    Create a button with upload and write this code OnAction
    Resource is the attribute name in context of type com.sap.ide.webdynpro.uielementdefinitions.Resource, this attribute is for Resource property for Upload UI Element.
    Then in OnAction of button
    InputStream text = null;
           int temp=0;
           try{
                File file = new File(wdContext.currentContextElement().getResource().getResourceName().toString());
               String path = file.getAbsolutePath();
                wdComponentAPI.getMessageManager().reportSuccess(path);
           }catch(Exception e){
                e.printStackTrace();
        //@@end
    Regards,
    Pradeep
    Edited by: pradeep_546 on May 11, 2011 12:22 PM

  • Reading the context of csv file

    Hi Experts
    I want to read the content of csv file that is avaliable in my desktop, I want to use file upload UI Element to pick the file. Please help me with sutiable code
    Regards,
    Anand

    Hi ,
    You can read a .csv file in the following way :
    BufferedReader in=null;
    InputStream inStream = null;
    IWDResource resource = wdContext.currentContextElement().<attribute name of type resource>;
    inStream = resource.read(true);
    in = new BufferedReader(new InputStreamReader(inStream));
    Collection fileData = new ArrayList();
    //reading the file line by line
    while ((line = in.readLine()) != null) {
           List row = new ArrayList();
           line = line.replaceAll(",","");   // csv file is comma separated file , so that comma's are separated by ''.
           String[] colValue = line.split("~");
    // now you can use for loop to get the values and add it to the value node.
    Thanks
    Ritushree Saha

  • How to migrate the RPD and catalog file from siebel analitics to obiee

    hi all
    How to migrate the RPD and catalog file from siebel analitics to obiee and obiee to obiee 11g
    Thanks
    Sreedhar

    hi sreedhar,
    you can migrate from siebel to obiee 10g...check this out http://debaatobiee.wordpress.com/tag/migration-siebel-analytics-obiee/
    Next install OBIEE 11g and migrate obiee 10g to 11g using this http://prolynxuk.com/blog/?p=424
    hope answers your questions.
    Cheers,
    KK

  • How to make Finder NOT to show files from a specific folder in "All My Files"?

    Hello!
    Can someone please advice how to make finder NOT to show files from a specific folder in "All My Files"? See the attach - I recently installed Civilization 5 from Steam and now I have a lot of unneeded files (*.log and *.ini) shown in  All My Files colder in Finder.
    I don't want to see them. Any advise?

    Using "All my Files" was very handy before all this rubbish popped up. =(

  • How to read the contents of attached files

    Hi,
    I am designing a Form using LiveCycle Designer 8.0
    Scenario:
    User can attach the file through "Attachments" facility provided on Adobe  Reader.
    The requirement is to attach 3 documents and post it to SAP system using Web services.
    I am using the following code(which i got from this forum only) to find the number of files user has attached.
    d = event.target.dataObjects;
    n =  d.length;
    xfa.host.messageBox("Number  of Attachments: "+n);
    //Displaying  the names of the Attached files
    for( i =  0; i < n; i++ )
    xfa.host.messageBox("Name  of the file: "+d[i].name);
    My problem: is how to read the contents of the attached files so that I post it to SAP using Web services
    Thanks in advance!!
    Taha Ahmed

    In order to read the content of the Redo Log files, you should use Logminer Utility
    Please refer to the documentation for more information:
    [Using LogMiner to Analyze Redo Log Files|http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/logminer.htm#SUTIL019]
    Kamran Agayev A. (10g OCP)
    http://kamranagayev.wordpress.com
    [Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/]

  • Problem in reading the JDK1.4Logger configuration file from java prog

    I have written a java program and want to log the messages in a log file , I'm using commons logging with JDK1.4logger as logging subsystem .
    I am facing the problem in reading the JDK1.4Logger configuration file which is commons-logging .properties file from my java program as a result my log messages are appearing directly on the screen while I try to run program , during compilation no error is shown . I have tried to set java.util.logging.config.file ="Path of my commons-logging .properties file " by setting system properties also.
    Please suggest the appropriate solution for this .

    Some webservers won't recognise the resource bundle provided in message-resources
    In that case, you need to specify that resource bundle information in web.xml at the time of specifying the action servlet like this. Check for the init-param application.
    <servlet>
        <servlet-name>action</servlet-name>
        <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
        <init-param>
          <param-name>application</param-name>
          <param-value>resource.ApplicationResource</param-value>
        </init-param>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>2</param-value>
        </init-param>
        <init-param>
          <param-name>detail</param-name>
          <param-value>2</param-value>
        </init-param>
        <init-param>
          <param-name>validate</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
      </servlet>In this, the drawback is, you can not specify the key for your resource bundle. In the JSP, you have to access the property like this.
    <bean:message key="label.fName"/>

  • How to start the Toshiba Ghost image files from the HDD

    Hello
    Ok this is a tough one but hopefully some tech/wizz can help me out.
    I have all the necessary CD Recovery disc but my Toshiba laptop CDRom has died and i'm looking for replacement at the moment.
    I have managed to copy the image files and all the other info from these CD's onto the laptop hard drive via a network from my desktop cdrom. I did try to use the desktop cdrom to boot the 2.5" laptop drive but it knew it wasnt a toshiba laptop so wouldn't let me recovery.
    However now I have manage to copy all the ghost image files onto the laptop hdd I'm stuck on how to run installation via dos.
    The laptop hdd is formatted and all i have are the following files
    span.bmp
    setenv.bat --------> batch file contains following lines
    @ECHO OFF
    SET GHOSTPAR=
    SET SWN=01237000
    SET EXT=GHO
    SET VOLLABEL=%SWN%
    SET FILENAME=%SWN%.%EXT%
    01237001.GHS------> PART 2 OF IMAGE
    01237000.GHO -----> GHOST IMAGE MAIN
    01237000.CRC
    A folder called G_INST
    which contains 3 extra folders BMP, DOS and TOOLS and span.bmp
    I cant figure out how i can run ghost to extract and recovery my HDD can someone help me :)
    Thanks in advance
    Simon

    Im really skeptical if you will be start the Toshiba ghost image files from the second partition without using the Symantec Norton Ghost software.
    I have created a ghost image of the C partition and placed it on the D partition.
    To recover the C partition I have to start the Ghost Utility and have to use the image file .gho from D partition
    I have googled a little bit and found the useful instruction how to recover the Portege M3500 without using an CD/DVD drive. Maybe this will run also on the Sat A30.
    http://mobilepcwiki.com/mpc/index.php?title=Toshiba/Portege_M3500/FAQ
    By the way: the internal, compatible ODD can be ordered from the ASP in your country!

  • Using SQL stored procedures How to get the list of .rar files from e:\Tempbackup directories from the different remote desktop windows server and delete the .rar files which contains the current month and date

    Concept:
    Every month i need to find the list of .rar files from the
    E:/TempBackup directory from the different environments (remote desktop servers) and i need to delete the current month
    .rar files alone from the respective (E:/TempBackup) directory. below is example files structure inside the
    E:/TempBackup.
    example:
    zDROP_2014_08_31_Backups.rar
    zDROP_2014_09_31_Backups.rar
    zDROP_2014_10_31_Backups.rar
    from the above list i need to delete the zDROP_2014_08_31_Backups.rar(current month) file alone and also logs should be capture for this deletion.
    key words for this are zDROP and Current month and date.
    i need a stored procedure for this concept. could you please help on this.

    Hello,
    You can schedule an operating system task (Control Panel -> Schedule task) to either call a batch file or a PowerShell script.
    Please read the following resources for examples:
    http://social.technet.microsoft.com/Forums/windowsserver/en-US/61373719-fffb-4d94-bdbe-7d8ed8620b44/delete-filesfolders-on-remote-servers-using-powershell?forum=winserverpowershell
    http://www.networknet.nl/apps/wp/archives/943
    http://jeffwouters.nl/index.php/2011/10/powershell-script-to-delete-files-older-that-a-week/
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Reading Files from client directory folder using servlets or struts.

    HI All,
    Could you please help me out int the below query.
    I want read all files from paricular directory folder from the client machine in web application. I am able to do it from my local machine. but when I am try to do it from some other machine I am not able to get the file list.
    It is very urgent ..please hep me ASAP.

    It should be problem with the file permissions in your client machine ???Hardly.
    @OP: a servlet executes at the server. It doesn't haved any access whatsoever to the client machine.

  • How to read the content of .msg file type with attachments in SAP crm?

    Hi All,
    Need to develop a RFC FM which will take any BP number as input
    Read the attachments in the BP and identify the attachment which is an email( .msg).
    Identify by the mime type and file extension
    Scan through the email to get the attachments of that email read the content of the
    attachment as a binary file and return that binary file with file name, size
    etc.
    I need to read the data (in binary format) attachment of an attachment of .msg file type .
    I have done till step 2 .
    Please help me on step 3.
    Thanks&Regards,
    Pratap Naik

    Can any one help me on this ?
    Thanks in advance.
    Regards,
    Pratap Naik

  • How to Read the Timestamp of a File on Unix from Form?

    If you have a file located on UNIX operating, what is the best way to read the time stamp (the date that file has been created) of that file from Oracle SQL, SQL*plus, or Developer Forms 6i/9i/10g?

    Thanks Robin for the reply! Your suggestion seems to be good!
    However, We found a solution now! I would like to share with you the way we did, in case anyone out there need the solution:
    In SQL*Plus, we created a Java Source below:
    CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "FileDate"
    AS
    import java.io.File;
    import java.text.SimpleDateFormat;
    import java.util.Date;
    public class FileDate {
    public static String GetDate(String strFilePath) {
    String ReturnValue = null;
    if (strFilePath == null || strFilePath.length()==0)
    // do nothing
    else
    File aFile = new File(strFilePath);
    if (aFile.exists())
    long lngTime = aFile.lastModified();
    Date aDate = new Date(lngTime);
    SimpleDateFormat fmtDate =
    new SimpleDateFormat("dd-MM-yyyy HH:mm:ss");
    ReturnValue = fmtDate.format(aDate);
    fmtDate = null;
    aDate = null;
    aFile = null;
    return ReturnValue;
    -- Then we created a wrapper to call the Compiled Java above:
    CREATE or REPLACE FUNCTION FileDate_GetDate(FilePath IN STRING)
    RETURN VARCHAR2 IS
    LANGUAGE JAVA
    NAME 'FileDate.GetDate(java.lang.String) return int';
    -- Then we created a database package:
    -- Package Spec:
    PACKAGE sap_dnld AS
    FUNCTION get_file_date2 (s1 varchar2) RETURN VARCHAR2;
    END sap_dnld;
    -- Package Body:
    PACKAGE BODY sap_dnld AS
    FUNCTION get_file_date2( s1 VARCHAR2 )
    RETURN VARCHAR2 AS LANGUAGE JAVA
    NAME 'FileDate.GetDate(java.lang.String) return int';
    END sap_dnld;
    -- Then we tested the whole thing in SQL*Plus:
    set serveroutput on;
    declare
    x varchar2(2000);
    begin
    x := sap_dnld.get_file_date2;
    dbms_output.put_line(x);
    end;
    -- Then we called the function from the package using a procedure from the form:
    PROCEDURE Find_date IS
    BEGIN
    :control.file_date := sap_dnld.get_file_date2('directory1/subdirectory/filename.txt');
    END;

Maybe you are looking for

  • Best Practise for Data Refresh & Hierarchy

    Hi, During a recent discussion with one of our BI user groups, the questions were raised as what the best practice are to handle the following two issues. Issue 1: If entries are posted to the prior periods in SAP R/3 (outside of the daily auto-refre

  • AS3 swf tiny question

    I have a feeling that I know the answer to this. I am not terribly savvy on Actionscript (basic sklls, not expert)..and not in 3.0 at all!!!!!!!! I have a website that is done nearly all in Flash with AS2.0. I recently added a video player from a vid

  • One of My External Drive Icons is invisible how do I get it back

    Hi. I have a couple of External (USB and Firewire) drives. Recently my Firewire drive (a WD My Book Studio 1Tb Drive) disappeared from the desktop and finder. If I look in Disk Utility it is there and I can reveal it or open it from Disk Utility and

  • Exporting to excel UI restarting

    Hello am new to SAP and i was given a task same as this. I have changed the Macros settings, but the problem is everytime i have to refresh the browser to be able to export a large number of records from my worklist, without restarting the GUI it dis

  • How to export Safari 7.0.3 reading list?

    How do I export my Safari 7.0.3 reading list to a PC or to documents folder?