How to get file names for one oracle directory object.

Hi all ,
I defined one oracle directory object . Now I want to know how many files stored under this object in physical directory and their names ? anyone know how to do it by pl/sql ?
Thanks,
George

Chris Poole has an [XUTIL_FINDFILES package|http://www.chrispoole.co.uk/apps/xutlff.htm] which can do this in pure SQL. It does require, though, that your DBA install code in the SYS schema and that you rely on the behavior of an undocumented X$ table. That may not be possible in certain environments.
I personally prefer a small Java stored procedure along the lines of [this one from Tom Kyte|http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:439619916584]. It isn't a pure PL/SQL solution, but it tends to fit relatively cleanly in any environment. Most DBAs will be willing to grant the privileges this sort of approach requires where they would be hesitant to grant the access necessary for XUTIL_FINDFILES.
Justin

Similar Messages

  • How to get file name for failed request in JSOM

    hello friends,
    i am uploading files to sharepoint 2013 document library. due to some problem when a file is not uploaded request is failed and failed callback handler is executed. at this time how i can know for which file has not been uploaded.
    as i am uploading multiple files so it is necessary to know for which file error occurs.
    please help 
    Thanks in advance.
    Mukesh

    Hi Z..
    it will be hard for any one to understand the code. how ever I have provided bellow.
    theme is I need to upload multiple files selecting one by one asynchronously when a file will begin to upload It will show status of file name with processing image. similarly for other files.
    ones file successfully uploaded processing image will get hidden. and delete will appear.
    when error occurs for a file then processing div need to be removed for which I need file name when request failed. in failed handler
    function uploadData()
    var input = $("#fldFile")[0];
    if (input) {
    $("#uploadedfile").append("<div class='file'><label>" + input.files[0].name + "</label><div class='image'><img src='/_layouts/15/KPMG.VendorPortal.DMS/processing.gif' alt='processing..'/><img src='/_layouts/15/KPMG.VendorPortal.DMS/error.png' alt='delete' style='display:none;' /></div>");
    file = input.files[0];
    filename = input.files[0].name;
    fr = new FileReader();
    fr.onload = uploaddocument;
    fr.readAsDataURL(file);
    function uploaddocument()
    web = clientContext.get_web();
    clientContext.load(web);
    list = web.get_lists().getByTitle("TempLibrary");
    rootFolderUrl = list.get_rootFolder();
    file = this.result;
    clientContext.load(rootFolderUrl);
    clientContext.executeQueryAsync(onuploaddocumentsuccess, failed);
    function onuploaddocumentsuccess()
    fileCreateInfo = new SP.FileCreationInformation();
    fileCreateInfo.set_url(rootFolderUrl.get_serverRelativeUrl() + "/" + foldername + "/" + filename);
    fileCreateInfo.set_overwrite(true);
    fileCreateInfo.set_content(new SP.Base64EncodedByteArray());
    // Read the binary contents of the base 64 data URL into a Uint8Array
    // Append the contents of this array to the SP.FileCreationInformation
    var arr = convertDataURIToBinary(file);
    for (var i = 0; i < arr.length; ++i) {
    fileCreateInfo.get_content().append(arr[i]);
    // Upload the file to the root folder of the document library
    uploadedfile= list.get_rootFolder().get_files().add(fileCreateInfo);
    clientContext.load(uploadedfile);
    clientContext.executeQueryAsync(documentuploaded, documentfailed);
    function documentuploaded()
    var fname = uploadedfile.get_name();
    $("#uploadedfile").children("div").each(function () {
    var flabelname = $(this).children("label").text();
    if (flabelname.trim() == fname.trim())
    $(this).children("div").children("img").get(0).style.display="none";
    $(this).children("div").children("img").get(1).style.display="block";
    alert("uploaded");
    function documentfailed(sender,args)
    Mukesh

  • How can I get file list for a given directory?

    Hi,
    How can I get file list for a given directory? Is there a function?
    Thanks.

    Hi friend,
    Try this sample report. It displays all files in a directory.
    While executing give some directory name in input. ex:  C:\
    Mention file type in filter parameter. ex: *.DOC
    REPORT ztests.
    DATA : file_table LIKE TABLE OF sdokpath WITH HEADER LINE .
    DATA : dir_table LIKE TABLE OF sdokpath WITH HEADER LINE .
    PARAMETERS:p_dir(50) TYPE c.
    CALL FUNCTION 'TMP_GUI_DIRECTORY_LIST_FILES'
      EXPORTING
        directory  = p_dir
        filter     = '*.DOC'
      TABLES
        file_table = file_table
        dir_table  = dir_table
      EXCEPTIONS
        cntl_error = 1
        OTHERS     = 2.
    LOOP AT file_table .
      WRITE:/ file_table-pathname.
    ENDLOOP.
    Might be helpful...
    Thanks.....
    Edited by: Guest77 on Feb 11, 2009 5:30 AM

  • How to get column names for a specific view in the scheme?

    how to get column names for a specific view in the scheme?
    TIA
    Don't have DD on the wall anymore....

    or this?
    SQL> select text from ALL_VIEWS
      2  where VIEW_NAME
      3  ='EMP_VIEW';
    TEXT
    SELECT empno,ename FROM EMP
    WHERE empno=10

  • How to get file name of the form attachment?

    Hi,
    is there anybody who is able to help me with the following problem???
    I started my process from Workspace ES and as a first step I attached one locale file (IMG.JPG or IMG.TIF e.g.) as a form attachment. I used "Attachments" bookmark in the Workspace ES.
    I need to get file name of attached file in the process!!!
    I tried to use "getTaskAttachments" component to get file name of form attachment but without success. This component successfully obtained attached file an stored it in the variable (type list, subtype document) but didn't produce all file attribute informations such as basename or Content Type:
    Is there some possibility to obtain file name (including file extension) by using "standard" tools and components of ALC?
    Thanks for your suggestions.

    Hi LekomDev,
    I faced the same situation some time back and this is what I know.
    Based on the file type few of the attributes will or will not be populated. (This is what the official documentation says about Document attributes)
    The file name that you are looking for would mostly be in 'name' attribute of Document object. The 'wsfilename' attribute is the atrribute which gets used to show the file name into Attachments tab of the workspace.
    So, if you are just interested in knowing the filenames then 'name' attribute is the place that you are looking for.
    But if you are trying to solve an issue in which Attachments against a Task isn't showing the filenames properly then you would need to copy the 'name' attribute value into 'wsfilename' attribute and then the Attachmetns against a Task would have the correct names.
    Tip: Use the Record and Playback option of the workbench to inspect the Document variable and you would see all of the values for a Document variable at desired step in your orchestration.
    hope this helps,
    cheers,
    Parth Pandya
    Blog: http://livecyclekarma.wordpress.com

  • How To Get Attribute Names for a Particular VO

    Hi ,
    How To Get Attribute Names Of a Vo where I can Set Viewattributname To the Table RN Columns Where I am Adding Extra Columns Based on Some Condn..
    So wen i am creating new Column to existing Table RN and we Need to add Attribute Name Also...Rt..
    And How To get RelationShip Between Database Column Name and Java Vo Attribute Name
    Ex: PlanId is the Java VO Attribute Name for the Database Column PLAN_ID
    In The Same way Hw We Get the Relation ship for All other columns In the Controller Cllass ..
    Can Any One Reply as It is urgent Req...
    Thanks ,,
    Jithen

    Instead of using the VO attribute names to set and get values, best to go to the VO definition, click on Java, and generate the View Row Class with the accessors.
    In the class where you're trying to set attributes, instead of a Row class, use the View Row class of your VO (eg ViewObjectName's class would be ViewObjectNameRowImpl), and when retrieving a row from the VO, cast the row to the previously mentioned View Row Class.
    At that point you can use the View Row Class's methods that would perform sets and gets of each column.
    To get attribute names, I don't know off the top of my head, but there might be a method mentioned in the Javadoc for the ViewRowImpl or ViewObject or ViewObjectDefinition classes to get the attribute/column mapping, or perhaps you can somehow read the XML definition of the VO which has that mapping.
    Assuming business components were built automatically and no attribute names were overridden, intuitively the attribute name is a camelcase version of the column name, removing understores and capitalizing the character following the removed underscore - but that's not a fool proof approach. Just a general observation.
    Hope this helps.
    Edited by: user6631964 on Sep 16, 2010 12:31 PM

  • Get file name of one folder

    Hi
    I want to know all file names of one folder which is on the presentation server.
    I dont want to use FM: TMP_GUI_DIRECTORY_LIST_FILES.
    because it wont work in background.
    Regards,
    Vishwa.

    Similar Post,
    Link:PROBLEM IN FM TMP_GUI_DIRECTORY_LIST_FILES

  • How to get file name in faultpolices file for file based rejection handler

    Hi All,
    I am implementing the file rejection handler in fault polices.xml
    Now i want to catch exact file name and use this in faultpolices.xml under Filename tag and move the rejected file to custom directory.
    Can some please let me know is it possible to catch the exact filename and use the same name in rejection handle.
    Suppose If we don't handle the rejection handler then these files will move to the default path in SOA HOME. But the file name remains the same. So i think this can be changed in SOA, but i am afraid i how can i do it.
    Please suggest me.
    Regards,
    Tarak.

    Hi,
    have a look at my new weblog:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    to see how you can access filename
    Regards,
    michal

  • How to Load file name in to Oracle table column

    hi,
    I am loading data from flat file(TEST_GRET.DMP) to oracle table.
    while the Target Oracle table has four coloumns, in which one is File_name.
    I want to load the FILE NAME into that table too. as there is no ????
    how it can be done???
    Regards,

    If you are loading multiple files using a single interface, using variables, Bhabani's first solution and my solution are good.
    If you only have one interface with your datastore, you know the file name and it won't change, you can use Bhabani's second solution or mine.
    I did not test my solution but it is quite simple to test.
    Just put the code provided for the mapping of your target column.
    This solution has the advantage it should always work.
    Regards

  • How to get file name and set it as static text in a dialog

    Hi,
    I m new to InDesign Programming.
    I have a menu that creates a dialog with different controls in it.
    The dialog will appear only if there is an open file. I need to display the name of the open file as a static text in the dialog. I know to get the name of the current file but don't know how to pass this each time the dialog is opened.
    Can someone help me in doing this?
    I m using InDesign CS3 in MAC OS.
    Thank You.

    those are the methods, but you can't use getCharacterEncoding(), actually, cuz it seems it's not necessarily filled in.. or at least that might be on some servers only, like Tomcat 4. As for encodings, you need to do a search for character encoding names and use the appropriate one.

  • How to get File name in Proxy program

    Hi,
    According to my business scenario, one XML file name comes from Legacy system and stores in a predefined directory. Now XI has to pick up that XML file and needs to call BAPI's which in turn updates the Target system ( SAP Tables).
    Now my problem is , XML File name is a combination of three fileds those are DATE , OBJECTKEY AND WORKFLOWNAME.
    Ex : YYYYMMDD_1234565789_WORKFLOWNAME.XML
         DATE_OBJECTKEY_WORKFLOWNAME.XML
    In proxy i need to get the file name and split into three fields ( those are DATE , OBJECTKEY AND WORKFLOWNAME ) which needs to send as import parameters in BAPI's.
    So please let me know from anyone in this group how to get the file name in the proxy program.
    Thanks & Regards
    K. naveen Kumar

    Hi,
    have a look at my new weblog:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    to see how you can access filename
    Regards,
    michal

  • File to idoc how to get file name at runtime

    Hi Experts,
    In my file to idoc scenario,
    the requiremnt is like in mapping i have to give condition like if file name is name1 then one target filed is 40 and if file name is name2 then that target field is 60.
    how can we achieve this ?
    Regards,
    rohit

    Hi Rohit
    mughdha is right but you can do it through graphical mapping easily
    give condition in fix value under category conversion like this
    1) source-> FIX VALUE ->if value is true then map FIX value
    else nothing
    double click on first FIX VALUE function and assign your input values for file (for ex 40 or 60,......) in the key field and in the value field assign TRUE
    if this condition will be true the it willl map second FIX VALUE
    else assign a constant with empty value
    in second fix value assign values (for ex 40 or 60,......) which you have checked in first FIX VALUE function in key field and assign corresponding name which you required in the value field
    hope this will solve your problem
    Thanks
    sandeep
    if helpful reward points

  • How to get file name in adapter module

    Hi all
    Is it possible to get the file name in a adapte module? If so how can I achieve this?

    Hi,
    Check below thread. it shows code for file name.
    [Re: Query regarding Adapter Module development]
    -Gouri

  • How to get file name using File adapter Sync read

    Hi All,
    I am using SOA 10.1.3.3 and JDEV 10.1.3.3.
    I have an async bpel process.
    I have to read file name in this process... so i have used file adapter sync read operation.
    How can we get the file name with out payload using sync read.
    For normal read (Inbound Spec)we have UseHeaders="true" property.
    Is there any property for sync read to read the file name.
    Please help me
    Regards
    PavanKumar.M
    Edited by: [email protected] on Oct 27, 2009 11:23 PM

    Hi Eric,
    The info in the link provided by you is for a normal read.
    I need to read he file name using Sync read operation.
    Regards
    PavanKumar.M

  • How to get file name on the base of extension

    hi
    reply me
    how to get the filename on the base of extension from the
    current directory......
    for example
    i create file with the "igg" extension and save in the folder
    where the exe file of director save....
    i want when exe run then exe file read filename of the
    define( "igg" ) extension with out path just name of the file with
    igg extension
    tel me how
    regards
    farhana khan

    Here's a solution that requires no xtras:
    on GetFilesWithExtension(aFolderPath, aExtension)
    -- INPUT: <aFolderPath> should be a valid string
    folder path
    -- <aExtension> may be a string file extension,
    without the
    -- dot. For example: "txt" or "igg"
    -- OUTPUT: Returns an error symbol or a linear list of file
    names
    -- in the given folder. If an extension is given, only
    -- files with the given extension will be listed. If not,
    -- all files and folders will be listed.
    vFileList = []
    if not stringP(aFolderPath) then
    return #stringPathExpected
    end if
    vIgnoreExtension = not stringP(aExtension)
    vDelimiter = the itemDelimiter
    the itemDelimiter = "."
    n = 0
    repeat while TRUE
    n = n + 1
    vFileName = getNthFileNameInFolder(aFolderPath, n)
    if vFileName = "" then
    exit repeat
    end if
    if vIgnoreExtension then
    vFileList.append(vFileName)
    else if the last item of vFileName = aExtension then
    vFileList.append(vFileName)
    end if
    end repeat
    the itemDelimiter = vDelimiter
    return vFileList
    end GetFilesWithExtension
    You can also use
    Buddy API's baFileList,
    which allows you to do wildcard searching.

Maybe you are looking for

  • Can't get back to my mac to work

    I am guessing that this problem belongs somewhere in the server section. I am very crossed about this, as I have been calling apple support twice, they told me to chip on all the remote functions in sharing, and since remote management chips off scre

  • Recognising Sony PRS-T1 in Adobe Digital Editions

    Why doesn't Adobe Digital Editions recognise my Sony PRS-T1 ereader?

  • Creating Packages in Solaris 10

    I have couple scripts (shell files) I need to package. How do I start packaging my files? I got these files: 1. installCPU.sh 2. shutdb.sh 3. startdb.sh 4. startlsnrctl.sh 5. stoplsnrctl.sh I need to put these files into a single package to help our

  • HT5587 Power button to turn off phone not working.... Help!

    Power bottom to turn iPhone off does not work.  Screen will turn off after a bit of no activity, but power off function when pressing does not work.  Any ideas for repair?  Thank you.

  • Dreamweaver and flash combined?

    hey everyone, i'm new at both dreamweaver/flash and currently have a project combining the two together and i really cant work it out (i'm even using html instead of css haha) :/ Anyway, what i want to do is have a zipper (as in a zipper on ones clot