Reading files from local hard disk - Access Local Files Only

Hi All,
I have a local flash file published as 'Access Local Files Only', to allow me to read from local filesystem.
What methods or classes can I use to read text and other files from the user's harddisk.
This is the first time I am trying to do something like this, all help is grealy appreciated.
Thanks
Andy

Hi, thanks for the responses
I did some searching and found that the urlloader class is the right one for the job.
'Access Local Files Only' option is provided for this very purpose I believe.
If anyone has done something like this and have some sample code it would be awesome
Cheers
Andy

Similar Messages

  • Problems with indexing files from my hard disk

    Hi everybody,
    I'm a newbie to oracle and i'm trying to index files from my hard disk with oracle text. After i created a simple text file (path: 'c:\tmp\test.txt') and filled it with a short text, i executed the following lines without an error message:
    grant connect, resource, ctxapp to myuser;
    create table myuser.testtab(id number primary key, text BFILE);
    create or replace directory test_dir as 'c:\tmp';
    grant read on directory test_dir to myuser;
    insert into myuser.testtab (id, text) values (1, BFILENAME('test_dir','test.txt'));
    create index myuser.idx_test on myuser.testtab(text) indextype is ctxsys.context;
    the record in the table testtab is stored, but the index table is empty. After i tried to get information about the bfile with java i got an SQLException with the Error-Code ORA-22285 after executing the following lines:
    BFILE file = null;
    try{
    rset = stmt.executeQuery("select text from testtab where id = 1");
    if (rset.next()) {
    file = ((OracleResultSet) rset).getBFILE(1);
    System.out.println("Result from fileExists: " + file.fileExists()); //This is the line where the exception is thrown
    } catch (Exception e){
    e.printStackTrace();
    I would be obliged for any information to this problem.
    Thanks in advance,
    Chris J.
    PS: i'm using Oracle 11.2g on Windows 7

    I got your problem. Drop all the directory,table and index. Log in as "myuser" and do all the things. See the demo below. Don't use myuser.object name When executing the commands from "myuser".
    SQL> conn sys@xe as sysdba
    Enter password: ******
    Connected.
    SQL> create table hr.testtab(id number primary key, text BFILE);
    Table created.
    SQL> create or replace directory test_dir as 'c:\';
    Directory created.
    SQL> grant read on directory test_dir to hr;
    Grant succeeded.
    SQL> insert into hr.testtab (id, text) values (1, BFILENAME('test_dir','test.txt'));
    1 row created.
    SQL> ed
    Wrote file afiedt.buf
      1* create index hr.idx_test on hr.testtab(text) indextype is ctxsys.cont
    SQL> /
    Index created.
    SQL> select * from ctxsys.CTX_INDEX_ERRORS;
    ERR_INDEX_OWNER                ERR_INDEX_NAME                 ERR_TIMES
    ERR_TEXTKEY
    ERR_TEXT
    HR                             IDX_TEST                       31-AUG-10
    AAAEjaAABAAAKsKAAA
    DRG-50857: oracle error in drstldef
    ORA-22285: non-existent directory or file for FILEEXISTS operation
    SQL> conn hr@xe
    Enter password: **
    Connected.
    SQL> select * from CTX_USER_INDEX_ERRORS;
    ERR_INDEX_NAME                 ERR_TIMES ERR_TEXTKEY
    ERR_TEXT
    IDX_TEST                       31-AUG-10 AAAEjaAABAAAKsKAAA
    DRG-50857: oracle error in drstldef
    ORA-22285: non-existent directory or file for FILEEXISTS operation
    SQL> conn sys@xe as sysdba
    Enter password: ******
    Connected.
    SQL> drop directory test_dir;
    Directory dropped.
    SQL> conn hr@xe
    Enter password: **
    Connected.
    SQL> create or replace directory test_dir as 'c:\';
    Directory created.
    SQL> drop table testtab;
    Table dropped.
    SQL> create table testtab(id number primary key, text BFILE);
    Table created.
    SQL> set serverout on
    SQL> DECLARE
      2   v_file BFILE := BFILENAME ('TEST_DIR', 'test.txt');
      3   BEGIN
      4   IF DBMS_LOB.FILEEXISTS (v_file) = 1 THEN
      5  DBMS_OUTPUT.PUT_LINE ('File exists.');
      6   ELSIF DBMS_LOB.FILEEXISTS (v_file) = 0 THEN
      7  DBMS_OUTPUT.PUT_LINE ('File does not exist');
      8  ELSE
      9   DBMS_OUTPUT.PUT_LINE ('Unable to test existence');
    10   END IF;
    11   END;
    12  /
    File exists.
    SQL> insert into testtab values (1,BFILENAME ('TEST_DIR', 'test.txt'));
    1 row created.
    SQL> create index idx_test on testtab(text) indextype is ctxsys.context;
    Index created.
    SQL> select * from CTX_USER_INDEX_ERRORS;
    no rows selected

  • I disabled my Macbook  Hard Disk and lock the settings, after i try to reboot, the system wouldn't come up. It refuses to read instructions from the hard disk. How can i enable the hard disk when the system wouldn't come up?

    I disabled my Macbook  Hard Disk and lock the settings, after i try to reboot, the system wouldn't come up. It refuses to read instructions from the hard disk. How can i enable the hard disk when the system wouldn't come up?

    How do you disabled it if running the same?

  • Deleting the old Archive Log Files from the Hard Disk

    Hello All,
    I want to delete the old archive files of Oracle. These files are very old and consuming very huge disk space.
    Is there any way by which I can delete these files from the Hard Disk?
    Can I directly delete them using the Operating System Command?
    Will it cause any dilfference to the normal functioning of my Database?
    If I need to delete these files, do I need to bring the database down?
    Please guide me.
    I need to do this activity to make some space free on the Hard Disk.
    Thanks in advance.
    Himanshu

    Hi.
    Keep archived logs from time of last backup and forward to currenct time on disk together with the backup itself. And keep older archived logs together with older warm/cold backupfiles on tape as long as there is enough capasity or following your recovery strategy. This way you might be able to roll forward a recovery without restoring these files from tape which often the faster.
    Older archived logs can be deleted manually, with scheduled OS script or automatically with RMAN.
    Good luck
    rgds
    Kjell Ove

  • No permission to access files from previous hard disk

    I've just changed to a new hard disk and could not open files saved from old hard disk. Message given when i tried to open those files is that i do not have permission. What can be the problem and what is a possible solution?

    If you do a Get Info on the volume, try the "ignore ownership on this volume" item at the bottom. You will have to authenticate by ckicking on the "padlock" before you can change the option.

  • Not able to delete file from external hard disk

    I connected my external hard disk to my macbook pro. But am not able to delete any file since it says the file cannot be deleted when I move it to trash. Could you let me know how to delete a file from the external hard disk?

    How is your HDD formatted? NTFS? FAT?
    Did you write files with rights? When you strike +I on any file, you can see its rights; if you're read-only, you may change your file's rights.

  • Cannot copy files from external hard disks

    This is happening often enough to be really painful:
    I insert a hard disk. I browse the files on it. I open a new window of Finder and drag some files from the external hard disk into my own machine (OSX Leopard 10.5.5). It croaks, telling me some "permissions" are wrong (Error -36).
    Browsing Google and Macosxhints and all of that, the suggestions indicate that I should "repair permissions", "repair disk", and reboot. All done. Still doesnt work.
    What now? I never had this problem with Windows. What's with this permissions drivel on OSX and how can I fix it once and for all? I only use my machine to browse on Firefox/Safari, talk with Skype, edit with Coda/Transmit, and then Office documents. Which of these tools changes these mysterious permissions so that I have to keep "repairing" again and again???
    Thanks for any pointers or advice!

    I am on shaky ground here because I am totally ignorant about about Windoze and MS-DOS. What I can tell you, though, is that the Unix underpinning of Mac OS X is heavily reliant on the concept of "ownership" which, apart from other factors, has security implications. FAT32 has absolutely no concept of file ownership. (That's why Microsoft encourages everyone to use NTFS instead - mainly for the security implications).
    You need advice - Sorry! - from someone more knowledgeable than me as to how to change both the format (to Mac OS Extended, Journaled) and the Partition Scheme (to GUID) *+while preserving your data+*. I presume that you would need to find a temporary home for that data, after which altering the drive's structures would take only a moment - but as to how to then correctly replace the data onto that drive I would prefer not to say. I would guess that simply transferring the data back onto the drive now with a 'Mac-appropriate' structure would suffice - but PLEASE do not entrust your data to my 'guess'.
    Wait patiently for someone who knows how to advise you to respond in this thread, or post again with a possibly more descriptive/pertinent title.
    Sorry not to have been of any help.
    Andreas

  • I tried to empty the trash, full of back up file from my hard disk and it just says: "The operation can't be completed because an unexpected error occurred (error code -8003)"

    I have an external hard disk of 319.73 GB that I use as back up memory and where I put all the movies and other files that I can't leave on the computer as they occupy too much memory space . One day I was deleting all the previous dated back up to have more space on it , but had to stop the trash for doing it cause it was taking too long and now every time that I try to empty the trash it just says "The operation can’t be completed because an unexpected error occurred (error code -8003)" and even if I press CONTINUE it won't empting it . I'm not really pratical with this things and I tried already to find out the solution here and on Google but apparently nobody ever had a similar error code and I don't know what else to do.
    I've a MacBook Pro with a Mac OS X 10.6.8 Version.
    Thanks again for the help and sorry if I did some english mistakes !
    PEACE & LOVE

    Hey donnie90,
    It seems like this article might be the best for helping you address this issue:
    You can't empty the Trash or move a file to the Trash
    http://support.apple.com/kb/ht1526
    Thanks for coming to the Apple Support Communities!
    Regards,
    Braden

  • Fix a few "lost" master files from accidental hard disk disconnect?

    By gross stupidity, I disconnected the firewire cable to my external hard disk on which reside all my masters in the middle of a 'relocate masters' execution. I normally load new images into the aperture library, cull and edit them, and then relocate the masters to the external hard drive where they reside.
    As a result of tripping over the HD cable, I now have 5 files that show up when one chooses "show in finder", but show as being located on some kind of phantom duplicate external HD address, but which contains only the 'missing' 5 files. I've not figured out a way to to copy these to the 'real' address (or anywhere else). Additionally, I have one image that still has a master but it is has been horizontally compressed.
    Any ideas?

    That is basically what I ended up doing for the five images. My greater concern was whether I might have in some manner damaged the database itself, or left some kind of "'ghosts" file bits to haunt me in the future. It seems to be behaving, so I'm hopeful that only the image references were lost. I've not yet deleted the damaged images in case someone alerted me to ramifications, but it is about time. I'm also not sure how to get rid of the 'dummy' files and their duplicate path name ( which appears otherwise empty).
    I hate it when I do something as dumb as I did...
    Steve

  • How can I recover files from a hard disk that I erased using the Erase Disk command in Disk Utility?

    Thanks for your help!

    Kappy wrote:
    True but a DVD is a lot less expensive than the cost of commercial recovery software. TestDisk is also free but it is a set of Terminal programs.
    Yes, it's not for GUI only using folks.
    Free Linux alternatives are awkward. First, you have to download a Linux ISO and burn it to a DVD. Then boot the live demo and install Linux. That requires first partitioning the hard drive.  And, on and on. It's nice if you already have a Linux installed.
    Linux doesn't have to be installed. It can be loaded into RAM for the duration of the recovery.
    Even if PartedMagic can be downloaded with a bootable Linux system it must still be burned to a DVD.
    Any computer can be used to burn the ISO to disk, which makes it attractive in that regard.
    Once PM is burned and booted off of it's loaded into RAM and flushed upon a reboot.
    But the data recovery software in PM requires familiarity of the command line. That's it's drawback unfortunately.
    However one can transfer files that were not deleted using this method.
    ...using recovery software such as Data Rescue II, File Salvage or TechTool Pro.  Each of the preceding come on bootable CDs to enable usage without risk of writing more data to the hard drive.
    Those "bootable cd's" of Data Rescue, File Salvage, and TechTool are probablly using Linux as it's a free OS.
    Apple won't allow their OS to be used, Microsoft charges a huge license fee. So that only leaves Linux.
    The user likely won't know that they are using Linux when using the bootable recovery disk, all they see is the recovery GUI.
    Data Rescue is likely best downloaded, installed and run from a familiar OS X installed on a new HFS+ formatted external drive, then option booted from.
    This would be faster than waiting for bootable disks to arrive in the mails. One has to use a exteranl drive anyway larger than the drive being recovered to hold all the potential recovered data.

  • Transferring files from one hard disk to another

    I want to stop using Aperture on my laptop and transfer my photographs to Aperture on my G5. Do I do this through export or just copy the files across from the library? How do I go about it?

    copy the entire library file across to the g5 ...
    and then on the g5 double-click the library file and presto-chango, good to go ...

  • How can I recover files from an hard disk that DiskUtility cannot rapair?

    When I push the power button of my PowerBook, while the computer is rebooting and you see the gray screen with the apple, the black screen appears saying that I have to restart the computer!
    I have connected the Power Book to another Mac BookPro 2.33Ghz, intel Core Duo 2G RAM via firewire.
    In the Mac bookPro desktop I cannot see the HD, and disk utility indicates this problem:
    +Verify and Repair disk “Macintosh HD”+
    +Invalid Volume Header+
    +Checking HFS Plus volume.+
    +Checking Extents Overflow file.+
    +Checking Catalog file.+
    +Invalid node structure+
    +Volume check failed.+
    +Error: The underlying task reported failure on exit+
    +1 HFS volume checked+
    + 1 volume could not be repaired because of an error+
    +and then:+
    +Disk Utility stopped repairing “Macintosh HD” because the following error was encountered:+
    +The underlying task reported failure on exit.+
    Of course, I didn't try to format it, because the HD contains data that I don't want to lose.
    I tried "Data Rescue II", and I can see and scan the HD, but it seems that I can only recover deleted files...
    Any suggestions on how to repair the HD without losing the files?
    Or a software suggestion that at least lets me first recover the files. If I recover the files, then I will try to reformat the HD.
    Ciao!
    beppe

    Before giving up I would try Alsoft Disk Warrior which may be able to fix the problem:
    http://www.alsoft.com/DiskWarrior/index.html
    If this doesn't work out you can usually recover most of your files with Prosoft's Data Rescue II:
    http://www.prosofteng.com/products/data_rescue.php
    Message was edited by: Zlig

  • I am using ibook G4 PPC with mac os x10.4.11. A day before I delete one file from my hard disk by mistake and after that when I restarted my notebook, it's not starting the os. Only that blue screen is there. please, show me how to deal with it.

    I am using an old ibook G4 ppc with mac os x 10.4.11. A day before by default I delete one file and I think it was the startup file of os because after that when I restarted my notebook it's not running the OS only that blue screen is there. This notebook was a gift for me and still it is so close to my heart. I don't wana loose it. Please, help me out.

    Without the install CD, you are hosed.
    What happened to it?
    It is possible to call AppleCare and order a replacement. They will charge you a nominal fee for shipping and handling.
    Allan

  • How to read images from local hard disk and display in tile layout

    Dear Folks,
    I have 100 images in a folder @ local hard disk (E drive).
    I would like to display them in Tile view of 3X3.
    I have options (Radio buttons) to chnage the layout at runtime to 4X4 , 5#5 and 6X6.
    Also when the change in layout happens, I wanted to make use of backgroudLoading of image view so that user do not want to wait till the entire tile loads.
    How do I achive this requiremet?
    Sample code if any of great help. Thanks in advance.
    Edited by: JavaFX_Duo on Jul 9, 2009 12:02 PM

    1. So I would like to know which is the {color:#3366ff}best way to load local images in ImageView{color}.I'm no expert, but is there a reason that you are using Swing to do the loading?
    2. secondly, currently the system displays all images only after the completion of creating all images. {color:#3366ff}How to display images as and when they are created.{color} So that the user has a feeling that the images are loading.JavaFX Image class let you display a lightweight placeholder, and you can bind the progress to some kind of visual indicator. I don't think you can display an image that is partially loaded.
    def PATHS: String[] = [
        "C://Ariel Atom//ariel-atom-1.jpg",
        "C://Ariel Atom//ariel-atom-2.jpg",
        "C://Ariel Atom//ariel-atom-3.jpg",
        "C://Ariel Atom//ariel-atom-5.jpg"
    function getImage(path: String): Image {
        Image {
            url: "file:///{path}"
            backgroundLoading: true
    Stage {
        title: "Image Tiles"
        width: 1024
        height: 800
        scene: Scene {
            content: [
                Tile {
                    columns: 2
                    tileWidth: 400
                    tileHeight: 400
                    content: for (i in [0..3]) {
                        ImageView {
                            image: getImage(PATHS)

  • Instructions on the Apple site to do this but it didn't work. How do I revert back to the original set up? All files still on local hard disk

    I moved the itunes folder to an external hard drive but it didn't work, so I want to revert back to original set up. All the files are still on the local hard disk. I have tried to reverse the steps I used previously but when I try to play a track it says original file could not be found. If I navigate to the itunes music folder and select a track direct from there it opens itunes and plays so I know the music is still on the computer I just can't figure out how to get it to play direct from itunes.
    Any help or advice would be greatly appreciated.
    Cheers

    In case you use "Clear history when Firefox closes" or otherwise clear history:
    *do not clear the Browsing History
    *Tools > Options > Privacy > Firefox will: "Use custom settings for history": [X] "Clear history when Firefox closes" > Settings
    *https://support.mozilla.org/kb/remove-recent-browsing-search-and-download-history
    Clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, passwords, and other website specific data.

Maybe you are looking for