Reading from file where file name is not exactly known.

Hi,
I have to read a file using utl_file. But the file name is not exactly known.
The file name would be of the syntax uplldr_XXXX.CSV , where XXXX can be any thing like 1234. so file name would be uplldr_1234.csv in that location.
How can I search the file in the specified location and process the file with name begins with 'uplldr_' .
Hope I am clear to express my needs.
regds,
ajoy

Hi,
Yes I have to use in PLSQL UTL_FILE.
i.e.
utl_file.fopen(v_file_path,v_file_name, 'r');
and v_file_name is the name of file similar to name of 'uplldr_XXXX.csv', stored in the path v_file_path. Considering there is only one file in the specified path.
Regds,
ajoy

Similar Messages

  • B2B identifying TP from file name and not Interchange

    We want B2B to identify trading partner from ISA/GS segment, but B2B is taking it from file name. We have property oracle.tip.adapter.b2b.edi.identifyFromTP set to "Interchange". As I understand based on the tip.property it should always take from the ISA/GS segment in dat file.
    We also have Trading Partner Identification Type set to EDI Interchange ID while setting up trading partner and it is set to the same value as Interchange Receiver Id in the Document Protocol.
    Anyone has any ideas?
    Thanks

    Hello Venkat,
    ideally this should work. Guess you have not restarted b2b after changing the tip.properties. If you still have issues, please raise an SR and also send the b2b.log in DEBUG mode.
    Rgds,Ramesh

  • Need help with EXS24 "read velocity range from file name"

    I am trying to import 127 drum samples to a single key using the option shown here. The option says "Map to key dropped on and read velocity range from file name". I can find no documentation in the manuals on how to do this. What is the syntax required in the file name to make this work? I need to do several of these imports. The capability is cleary there, but I need help on how the file name should be formatted. My thanks to anyone who can help.

    Hi
    Not a direct answer to your question, but if you are doing a lot of sample mapping etc, you may want to check out Redmatica's KeyMap Pro or the simpler Keymap 1:
    http://www.redmatica.com
    CCT

  • EXS24 read root key from file name only

    Has anyone encountered this with EXS24 in Logic 7? If you set preferences to "read root key from file name only" then EXS reads the root key from the file itself when loading samples. On the other hand if you set them to "read root key from file only" then it reads the root key from the file name. Or am I just imagining this?
    P.S. if anyone from Apple is reading, could you please update EXS24? It's a bit primitive by today's standards.

    Hi
    Not a direct answer to your question, but if you are doing a lot of sample mapping etc, you may want to check out Redmatica's KeyMap Pro or the simpler Keymap 1:
    http://www.redmatica.com
    CCT

  • Cannot move any files into trash to delete them. I get a Trash warning box saying "The Finder cannot complete the operation because some data in 'file name' could not be read or written.(Error code - 36)".Macbook has so much data it is almost not working

    Cannot move any files into trash to delete them. I get a Trash warning box saying "The Finder cannot complete the operation because some data in 'file name' could not be read or written.(Error code - 36)".Macbook has so much data it is almost not working.
    I have tried reseting to factory settings by removing battery and holding down the power switch for more than 5 sec but this does nothing.
    Any ideas would be greatly appreciated as I think with so much unwanted data on the desktop and other places the whole os will crash very soon.
    Thanks, Rick

    The hard drive may be dying anyway, or the directory damaged because it is so full.  You should never let the hard drive get over 85% full.
    A -36 error is a read/write error.
    All you did with the power is reset the SMC.  Does nothing to reset everything to factory settings. 
    Do you have your original 10.4 installer discs for the MacBook?
    Is your data backed up?

  • WCF Service and Sharepoint Form library : How i can read a access a form libray and query a item from file name and read form xml in WCF service ?

    WCF Service and Sharepoint Form library : How i can read or access a form libray and query a item from file name and read form xml in WCF service ?
    Ahsan Ranjha

    Hi,
    In SharePoint 2013, we can take use of REST API or Client Object Model to access the SharePoint objects like Form Library.
    SharePoint 2013 REST API
    http://msdn.microsoft.com/en-us/library/office/dn450841(v=office.15).aspx
    http://blogs.technet.com/b/fromthefield/archive/2013/09/05/working-with-sharepoint-list-data-odata-rest-and-javascript.aspx
    SharePoint 2013 Client Object Model
    http://msdn.microsoft.com/en-us/library/office/fp179912(v=office.15).aspx
    http://msdn.microsoft.com/en-us/library/office/jj193041(v=office.15).aspx
    With the retrieved file, we can then use XmlDocument object to parse it and get the values you want:
    http://weblogs.asp.net/jimjackson/opening-and-reading-an-xml-file-in-a-document-library
    http://stackoverflow.com/questions/1968809/programatically-edit-infopath-form-fields
    Best regards
    Patrick Liang
    TechNet Community Support

  • Cloud does not disappear from file name?

    why does it take "forever" for the cloud to disappear from file name?
    I saved a numbers document to the cloud a half an hour ago, and the cloud is still there.

    HDash-Tech,
    thanks for the tip, but since I have my iTunes Library on a NAS I have to direct iTunes every now and than via "choose library" to the folder and it doesn't make a difference...
    I think it's somehow due to my iTunes Match.  I know they do not sync audiobooks, but they mess up pretty much everything else within my library.  Songnames here and there and especially cd covers!
    Any other idea how to get it straigten out again?
    Thank,
    Daniel

  • SSIS- Reading Of File Name

    Need to perform below steps while loading data into target table from access database file
    Check if file exists in Folder (particular folder say c:\bin\file...)  
    If file does not exist ... exit
    If file exists  read CSV File for Y/N ( CSV file has value y or n only one column one row)
    If CSV value = Y
    Read the file name, up till "."
    Load access data where entry type = AAA and populate an additional column of source type as the FileName before "."
    If CSV value = N
    Read the file name,up till "."
    Load access data where entry type <> AAA and populate an additional column of source type
    as the FileName before "."
    I can understand how to check the value of csv file for y or n
    How can we check the presence of file, read the name uptill '.' store it in variable and populate it as a column value
    Any help or idea on the above
    aak

    Hi aakcse,
    To check whether accdb file exists in the spepcified directory with wildcard in the file name, you can use the following code:
    public void Main()
    // TODO: Add your code here
    string[] files = System.IO.Directory.GetFiles(Dts.Variables["User::vStrFilePath"].Value.ToString(), "*.csv");
    if (files.Length > 0)
    Dts.Variables["User::vBolFileExist"].Value = true;
    foreach (string file in files)
    Dts.Variables["User::vFileName"].Value = Path.GetFileNameWithoutExtension(file);
    else
    Dts.Variables["User::vBolFileExist"].Value = false;
    MessageBox.Show(Dts.Variables["User::vFileName"].Value.ToString());
    Dts.TaskResult = (int)ScriptResults.Success;
    Note: Assuming there is only one .accdb file in the folder, the script above assigns the file name of the .accdb file without extension to the String type SSIS variable User::vFileName.
    Regards,
    Mike Yin
    If you have any feedback on our support, please click
    here
    Mike Yin
    TechNet Community Support

  • Could not initialize photoshop, because the file name was not valid

    Hello,
    my friend (not very good with computers) asked me to fix his Photoshop 8, because "it just stopped working one day". When I try to run it, I see splash screen, initializing photoshop, something about TWAIN, and then:
    Could not initialize Photoshop, because the file name was not valid
    followed by crashing the Photoshop. I tried reinstalling Photoshop, resetting user preferences, even deleting all user settings from Documents and Settings folder, but nothing - I keep getting this error. I tried plugging in his camera, usb flash disks, because I thought Photoshop may created scratch file or something in there - but it didnt work.
    So I decided to install him my copy of Photoshop CS3, just to make sure its some bug in Photoshop 8, but I didnt believe my eyes - after installing, im getting the exact error again.
    And now Im completely lost - I was unable to google the error message, looks like Im the first person ever who happened to see it.
    His computer is about two years old, 2 GHz cpu, 512 MB RAM, some decent video card, 100 GB space left on disks, operating system is Win XP SP2.
    I would really appreciate any help, thank you in advance
    Peter

    >Yes, many times.
    :) never hurts to ask!
    also have you tried creating a new user with admin rights to see if it's an id issue? (sorry, there's several similar theads going on and i sometimes forget what i've read where.) there was just a guy yesterday that solved a similar problem by creating a new id. we could never tell what the problem was with the old one...

  • BDC read from file!

    Dear friends,
           I have one problem. When we are creating abap program by clicking on program button on recording screen it asks for the program name and there are 2 oprions..
    1) read from file and
    2)transfer from recording....second one is fine...but i am not able to use first option...how to use that and why it is used...
    Thanks And Regards,
    Bhavin Shah.

    Hi Bhavin,
          The basic difference between read from file & transfer from recording is that...
        In transfer from recording you have to give a session name or you have to choose call transaction. Here you have to give the data manually.
        The Read from file will generate a dataset where who have to give that path of your flat file. When you execute it the data from the flat file will go into the necessary fields you have choosen before. You can process the job in the back ground which will be executed and a log file will be generated so that you can check whether it is updated correctly or not.
          In general we use read from file option when we know that the data are correctly arranged for recording.
          For eg. if you want to update the database with the file you have to know the datatype and length of each database-field so that you can specify the data in a file.
          i.e Assume that you are having 2 fields in db-table of type char and length 10 & 20. Assume that you are going to give values for these fields as mala & kala.
    In the file... you should specify like this...
    mala      kala                xxx
    123456789012345678901234567890
    <---Ten--><-----Twenty------->
    In a Real Time scenario you have a very large table with 50 to 100 fields to update with a very large data like 1000 - 10,000 records and if you are not sure with the flat file data. Then you should not go for the file option.
    Hope this helps you.
    Regards,
    Maheswaran.B

  • Error reading from file glibc-2.5-24.i686.rpm RHEL 5 Setup stuck at 80%

    Hi, I am installing Oracle 10g on RHEL 5 (Red Hat Enterprise Linux 5) machine I am facing two problems
    1) while installing the rpm packages the following package gave an error
    Error reading from file glibc-2.5-24.i686.rpm
    2) I still gave a try to runInstaller command the installer opened but was stuck at 80%
    I have 3 GB ram and 320GB hard drive I am not sure what to put in the swap memory and other settings i blindly followed instructions given here
    http://www.oracle-base.com/articles/10g/OracleDB10gR2InstallationOnRHEL5.php
    What could be the problem where do I find the error log if its created
    Please help me
    Thanks
    Edited by: 891355 on Nov 6, 2011 12:06 PM

    I found the installActions file in the installer folder and I think this could be the problem
    INFO: The 'shiphomeproperties.xml' file is missing from shiphome location '/home/oracle/Desktop/database/install/../stage/products.xml.' Add this file to the 'Disk1/stage' directory of the shiphome.
    though I am attaching the log file for more details do you think the installer is corrupt :(
    InstallActions log file ==> http://www.mediafire.com/?nh7mx7bxqht9ovu
    Edited by: 891355 on Nov 6, 2011 1:35 PM

  • How to get my images always order by file name, and not by time of captur, in all the folders in the library?

    How to get my images always order by arquive name, and not by time of captur, in all the folders in the library?
    Sorry for the poor english, but im portugues.
    In the library we can change the order of classification of image by, time of capture, name of file etc... I'm wondering if its possible define to be always by the name of file.
    It ´s possible?
    And i have other question, in print label we have an option to auto rotate to feet in page to have the image using the maximum area in the page (auto rotate, zoom etc), its possible to change the orientation of the rotation to be always in  the other direction?

    The Muvos are USB Mass Storage devices and do not have the ability to display track information based upon ID3 tags.
    The Zens all read and display track info based upon ID3 tag information that is either gathered from an online source or entered by the end-user.
    If you want the track information displayed instead of the ID3 tag information, you could edit the ID3 tags and rename the title to whatever you have as the file name. Not sure why your file names would differ so much from the ID3 tag info though, almost all of my content has the same name for the filename as it does on the ID3 tag title.

  • Removing date from file name

    Hello,
    Is there any way to move all the file from one location to another and remove the datepart from filename.
    for eg:- if file name is abc_20150411.xls change to abc.xls. if file name does not contain date part then ignore it.
    Can any one suggest if its possible.
    Thank You

    Hi ,
    I have created package based on your question and decribed in detail in below post:-
    https://msbitips.wordpress.com/2015/04/12/ssis-removing-datestamp-from-file-name-when-moving-from-one-location-to-other/
    You need package code, just add comment in this thread.
    Thanks
    Prasad
    Mark this as Answer if it helps you to proceed on further.

  • How to read the file name....

    Hello all,
    I have a doubt on reading file name.
    I have 10 pdf files in the dir '/d01/tem/'
    I need to get/load those 10 file names using PL/SQL. Meaning I need to get the file names only not the file contents...
    Please help me to achieve this....
    Thanks and Regards,
    Muthu

    There is no public synonym for DBMS_BACKUP_RESTORE, so you need to prefix it with SYS and make sure your user has execute privilege on the package. This will fix call to DBMS_BACKUP_RESTORE, but you have another issue. - fixed tables. Only SYS can read them. You'd have to login as SYSDBA, create a view around x$krbmsft and grant select on it to your user.
    SQL> connect sys as sysdba
    Enter password:
    Connected.
    SQL> grant execute on DBMS_BACKUP_RESTORE to scott;
    Grant succeeded.
    SQL> create view v$krbmsft as select * from x$krbmsft;
    View created.
    SQL> grant select on v$krbmsft to scott;
    Grant succeeded.
    SQL> connect scott
    Enter password:
    Connected.
    SQL> set serveroutput on
    SQL> DECLARE
      2      p_directory VARCHAR2(1024) := 'C:\TEMP';
      3      p_null VARCHAR2(1024);
      4      i number := 1;
      5  BEGIN
      6      SYS.DBMS_BACKUP_RESTORE.searchFiles(p_directory, p_null);
      7      FOR x IN (select fname_krbmsft fname from sys.v$krbmsft) LOOP
      8        DBMS_OUTPUT.PUT_LINE(x.fname);
      9        EXIT WHEN i = 3;
    10        i := i + 1;
    11      END LOOP;
    12  END;
    13  /
    C:\TEMP\acbrd-0050.csv
    C:\TEMP\afiedt.buf
    C:\TEMP\A_3136_4000.log
    PL/SQL procedure successfully completed.
    SQL>SY.

  • File Names do not delete

    On my external drive (and not on my internal drive) my file names do not delete after deleting the actual file but leave a ghost behind. I have thousands of these ghosts now on my external drive and I don't know how to delete them. When I try to delete
    them it says that the file does not exist anymore. I've tried the recommended solutions to no avail. Maybe it makes a difference on an external drive?

    Hi,
    Firstly, please run chkdsk /f /r command to repair the disk error and then tried again:
    Run Check Disk from the Command Line to Find and Fix Errors
    https://technet.microsoft.com/en-us/magazine/dd637756.aspx
    if it's not helpful, boot computer into
    system recovery options menu and select Command Prompt, type the following commands:
    Type in "cd [path]" into the command prompt, where [path] is the location the ghost file in. Hit enter.
    Type "del [ghost file]", where [ghost file] is the name of the ghost file in question.
    After that, reboot the computer.
    Karen Hu
    TechNet Community Support

Maybe you are looking for