Using WEBUTIL_FILE.DIRECTORY_FILTERED_LIST

Does anyone know how to use using WEBUTIL_FILE.DIRECTORY_FILTERED_LIST?
I looked online and on this forum, and examplese don't exist. The Oracle web site defines what WEBUTIL_FILE.DIRECTORY_FILTERED_LIST is, but does not explain how to use it. What I need to know is how to create a cursor to read each file name one at a time in a loop. I've tried "WEBUTIL_FILE.DIRECTORY_FILTERED_LIST.next" and a bunch of other things but nothing is working.
Thanks!

From the manuals:
WebUtil_File contains APIs to manipulate files and directories on the client and to display
file selection dialogs. The package contains a new type FILE_LIST, which is a PL/SQL
table (array) used to pass back multiple file names. This array can be accessed using
standard PL/SQL table techniques. e.g. Use <file_list>.COUNT to return the number of
elements and <file_list>(n) to retrieve a specific numbered element.Example:
FOR i IN 1..list.COUNT LOOP
  -- do something with list(i)
END LOOP;

Similar Messages

  • How do I save multiple files from database using oracle forms?

    Forms [32 Bit] Version 10.1.2.3.0 (Production)
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    Hello,
    I have a form containing a block of records with files set up in a tabular layout. Each row has a checkbox to indicate if that row is selected. What I want to do is allow the user to save each file from checked rows to a directory of their choice on their machine when a button is pressed. Is it possible to do this in one command at the same time using WEBUTIL_FILE to save all the selected files to the same directory, or would I need to loop through each row and call the save dialog each time?
    Thanks.

    I'm not sure I follow. The SAVE_DIALOG is building the path including the filename where the files will be saved. If I have 5 different files I want to save at the same time and only show the dialog once, I will only have a path for one of the files. How could I loop through the rest afterwards?

  • WebUtil_File.File_Open_Dialog VERY SLOW with large amounts of files

    Dear Friend,
    We are using WebUtil_File.File_Open_Dialog on the client to allow for the selection of an image from a folder on the server, which contains around 2-3000 files.
    It takes around 10-15 minutes to display the files within the folder. This is obviously unacceptable and I was wondering if anyone had come up with a viable solution to this problem, as i noticed similar issues had been posted in the past and no solution was suggested.
    The function call for the above operation is: :control.fichier := WebUtil_File.File_Open_Dialog(:global.path||'images\bdsurvey\', '', '*.jpg |*.jpg| (All files)*.* |*.*|', 'Nom du fichier photo');
    Many thanks,
    John

    This can be done by the following:
    Tuning the file system - reducing/filtering unwanted files, defragmentation, FAT (NTFS might consume more time)
    I am not sure whether you can do anything for this in AS.
    Alternatively there are some java classes which may be used instead of web util.

  • Webutil_file.file_save_dialog

    i use
    webutil_file.file_save_dialog(null,fileName,null,'Save')
    i save a document from db to client.
    the fileName i read from the database.
    when i open the file_save_dialog the fileName is displayed as default. but when i want to save it somewhere else by browsing the filesystem, the filename is lost.
    whick means: when clicking a folder in the file_save_dialog the filename-field becomes the directory-name.
    is this normal? how can i keep the filename in the filename-field in a file_save_dialog?

    This is actually an underlying bug in Java - it's fixed in Java 1.4 so when you go to that version you'll get it for free.

  • Webutil: webutil_file.file_open_dialog seems to hang when cancel is pressed

    Hi,
    I just used webutil_file.file_open_dialog to select files. I noticed when I press the cancel button, webforms hangs. I have to close my webforms session with the taskmanager, while the cpu has gone to 99%
    I encounter the same problem when using webutil_file.file_selection_dialog.
    Am I doing something wrong or is this a bug?

    what was the code problem that you resolved - I am running into the exact same problem when using the webutil_file.file_open_dialog and I hit cancel it all hangs.

  • Webutil_file.file_size

    Hi,
    i tried to find the file size using webutil_file.file_size, its is giving the file size for small files like *98 KB*,after that am getting error like 'FRM-40735:WHEN-BUTTON-PRESSED trigger raised unhandled exception ORA-06502'.Please help me resolve this issue.thanks in advance.
    Regards,
    Tharini.
    Edited by: tharini on 22-Jul-2010 05:34

    As Francois mentioned, without the code example and version information we can't offer much help. When providing version information, do not say "10g". Please provide the exact numbers (e.g. 10.1.2.2).
    If you are trying to run the command repeatidly in a loop to get sizes for many files, this will likely fail, at least intermittently. You should not do this in a loop. If you cannot find any better way of doing it, at least put a delay between calls to each file or a SYNCHRONIZE after each call. This will be very expensive from a networking point of view, but it should resolve the problem.

  • Webutil: webutil_file.file_open_dialog with filter doesn't work as expected

    Hi
    I just tried to open files by using webutil_file.file_open_dialog. Since I only want to select files with the prefix "brp" (e.g. brp0001.txt, brp0002.lis), I fill the parameter file_filter with the value: brp*.*
    This doesn't work. The dialog only shows folders, but not the brp*.* files. I tried with switching to capitals, which doesn't solve anything. With the filter set to *.* the dialog shows all folders and files, so that seems to work ok.
    Is anyone aware of this problem and know a solution? I'm using webutil 1.0.2 (beta).

    K..here's some logging. As far as I can see it's all normal, but it doesn't work (no matter if I use a last | or not). Should be easy to reproduce.
    2003-okt-29 09:42:44.547 WUF[setProperty()] Setting property WUF_GFN_DIRNAME to y:\data\
    2003-okt-29 09:42:44.567 WUF[setProperty()] Setting property WUF_FILENAME to false
    2003-okt-29 09:42:44.567 WUF[setProperty()] Setting property WUF_FILTER to (brp_archief*.*)|brp_archief*.*
    2003-okt-29 09:42:44.587 WUF[setProperty()] Setting property WUF_GFN_MESSAGE to bestandsnaam selecteren
    2003-okt-29 09:42:44.597 WUF[setProperty()] Setting property WUF_GFN_MULTISELECT to FALSE
    2003-okt-29 09:42:44.608 WUF[getProperty()] Getting property WUF_GFN_OPENFILE
    2003-okt-29 09:42:45.679 WUF[gfnDialog()] Creating Custom File Filter : Mask=brp_archief*.*, Label=(brp_archief*.*)
    2003-okt-29 09:42:45.679 WUF[gfnDialog()] Open File mode
    2003-okt-29 09:45:27.203 WUF[getProperty()] Value of WUF_GFN_OPENFILE=

  • Using webutil to test file size (csv) .

    I use Webutil_file.File_Size to test if a csv file is empty.Even the file is empty it returns a value greater than zero (No data in the file).What could be the solution to find if no data in the file to return zero or another solution.Very urgent please!

    If you have a "very urgent" issue, I recommend contacting Oracle Consulting or Oracle Support. The forums are not for "urgent" issues. Also, in order to get "urgent" help, include as much detail as possible would be a good start. For example, exactly which Forms and WebUtil version are you using? What is the client platform (Windows what)?
    I have tested what you descibed using Forms 10.1.2.3 with WebUtil 10.1.2.3 on Windows 2003 and XP and it appears to work correctly. WEBUTIL_FILE.FILE_SIZE correctly returns 0 when the file size is 0 and returns the correct size when not 0.
         fileSize := Webutil_file.File_Size ('C:\someDirectory\somefile.csv');

  • Frm-92101 webutil in a pll

    Hello,
    i have created a pll that is using webutil-functionality.
    (webutil_file.directory_filtered_list)
    I try to use the pll in a fmb.
    If i use in the fmb webutil functionality directly,
    I have no problems at all.
    But If i use my own pll with webutil function calls in my fmb i get the error frm-92101.
    What have I to change to use webutil functionality in a pll?
    Greets
    Timo

    I found the solution for my problem.
    1.) Its not enough to set the class_path in the registry. Its neccessary too to set the path in
    the default.env (or another file as defined in the formsweb.cfg (envFile)).
    2.) If the pll is using webutil, the attached libraries in the fmb must be in the following order,
    webutil, own pll and NOT ownpll, webutil
    These two errors stopped me for hours.
    Greets
    Timo

  • CST file replacement for existing Director app

    I've got an existing Director application that I want to
    update via swapping out an existing CST file for a new one. I can
    create a new CST file on my Mac and when i re-launch the Director
    app the new cast member works great.
    But on windows... the updated CST file is rejected by the
    Director executable. Even if i re-rebuild the cast member from
    scratch on a PC after first re-saving my assets (24 bit BMP files)
    on the PC.
    Any ideas?

    I'm trying to use this (vals is a FILE_LIST variable):
    vals := WEBUTIL_FILE.DIRECTORY_FILTERED_LIST('\\srv\fld1\jpgs','*.jpg',TRUE);
    first_file_name := vals(0);
    But I get: identifier 'FILE_LIST' must be declared.
    Are there any steps to check if I have properly installed the datatype FILE_LIST? I suppose that's the problem now.
    Thanks for your help!
    EDITED: I solved that reinstalling webutil, and now I can use FILE_LIST. But the error message has changed, and is "oracle.forms.webutil.file.FileFunctions bean not found. WEBUTIL_FILE.GET_ATTRIBUTE_INT will not work". What's the meaning of this? Thanks.
    Message was edited by:
    Otakufran

  • How to copy a file from Client to Application Server

    Hello,
    My requirement is user selects a file from Browse button on oracle form - this location is on client side, and have to copy this file on Application server.
    I tried using webutil_file.copy_file function but it gives error - copy_file is not a procedure or is undefined.
    There is another way of Client_to_AS but it needs some changes in configuration files of webutil, which is not allowed in our scenario.
    Source - client machine resident file
    Target- Application server disk location
    So can any one help in this regard?

    Hi Francois,
    Thanks for your suggestion, actually i didnt want to use Client_to_As as client doesnt want to make any changes in any configuration files, no matter how small the change is.
    Anyways we are able to successfully copy the file using Client_to_AS, but one thing that i couldn't understand is why was our webutil_file.copy_file function failing?
    Any hint about this?
    Thanks!
    Avinash.
    Pune- India.

  • Problem with client_get_file_name

    Hi,
    v_filename := client_get_file_name(........);
    :b_test.test := v_filename;
    Above is the simple code that I use.
    But my problem is ... sometimes ( I think 1 out of 10 ), when I select
    the file in the dialogue and press open button, the dialogue closes but the file path
    cannot be assigned to :b_test.test.
    Anyone knows the reason ?
    Ivan

    Hi Gerd Volberg,
    Thanks for your reply.
    Does it mean that currently we cannot avoid this problem ?
    Many users complain about that it is not stable. It seems that what I can do is to ask
    them double click the file instead of selecting the file and then pressing the open
    button.
    does it solve the problem if i use webutil_file.file_open_dialog ?
    Thanks.
    Ivan

  • WEBUTIL FILE_SAVE_DIALOG BUG

    This is more untested code than a bug.
    I am using WEBUTIL_FILE.FILE_SAVE_DIALOG in my form to download a file from the database onto client machine.
    When the file dialog comes up and the user clicks on a directory to save to, the File Name field gets replaced with the directory name. In other words, file dialog assumes that the user wants to rename the file as "Desktop". Instead of saving the file (say photo.gif) into c:\...\Desktop\photo.gif, it creates a file called "Desktop". In the windows environment, the File Name field does not change with every click of the button. Does anyone have a workaround to stop the File Name field from changing when the user clicks on a directory?
    Thanks.
    kh

    this is a "bad" behaviour, but actually it is.
    Years ago I think, there were the same limitations in d2kwutil. Other non-oracle-tools have the same problem. I'm sure, that this will be corrected in the next versions.
    Gerd

  • Webutil_File_Transfer.Client_To_DB_With_Progress in Synchronous

    Hi,
    I am using the the webutil toolkit to do file transfer to and from the database. The webutil_file_transfer.Client_To_DB_With_Progress with the synchronous mode(i.e. asynchronous FALSE) locks the downloaded file from the database. I want to delete the file when i close the form. But it fails(i used webutil_file.delete_file()). Even the file cannot be deleted using the windows explorer, it says 'File is in use.. sharing violation'. This happens even after closing the form or closing the forms application browser.
    Using asychronous solves the issue, but i don't want to use this as i do lot of manipulations to the BLOB before i close the form. Using asynchronous fires the uploading event only during the commit or after the commit which needs the same 'where clause', which is manipulated in our application during the post-forms-commit.
    Synchronous method solves the issue but with the downloaded file getting locked. Is there any solution to this. Any help is appreciated.
    Thanks
    sentha

    Hello,
    Any help from Oracle Webutil Team, Duncan, Kavitha...
    Any help is appreciated.
    thanks
    sentha

  • Bookmark through CLIENT_OLE2

    Hello Seniors/Guru/experts
    we have custom built oralce application (forms 11g).
    Here is the detail:
    we have word template(employee record.dot) store in database through blob. And each template have bookmark .i.e. "Emp name". We are able to call that stored .dot file which is stored in blob column/table via WEBUTIL . And we want to pass value in that template ((employee record.dot) for boommark name "Emp Name" through forms 11g.
    We are able to open word and pass value through forms 11g but not in that template where bookmark is stored . so issue is :
    1.how to pass value in that bookmark which is template (And template is in table blob column).
    ********"We are able to call that stored .dot file which is stored in blob column/table via WEBUTIL ." Here the code.
    PROCEDURE Open_Doc
    IS
    -- Open a stored document --
    LC$Cmd Varchar2(128) ; -- command to be run in Windows
    LC$Nom Varchar2(100) ;
    LC$Fic Varchar2(128);
    LC$Path Varchar2(128);
    LC$Sep Varchar2(1) ;
    LN$But Pls_Integer ;
    LB$Ok Boolean ;
    FType VARCHAR2(20); -- File Type (Extension)
    CType VARCHAR2(128); -- Command Type (in Windows)
    -- Current Process ID --
    ret WEBUTIL_HOST.PROCESS_ID ;
    V_EMPID number(10);
    cursor c1 is select emp_name from employee where emp_id=:emp.emp_id
    Begin
         -- Local temporary file name --
         LC$Sep := '\'; -- you can use WEBUTIL_FILE.Get_File_Separator ;
    --     LC$Nom := Substr( :BIN_DOCS.Name, instr( :BIN_DOCS.Name, LC$Sep, -1 ) + 1, 100 ) ;
         LC$Nom :=:EMP.EMP_NAME;
    --message(LC$Nom);
         LC$Path := 'C:\Temp'; -- use standard DOS dir -- can use CLIENT_WIN_API_ENVIRONMENT.Get_Temp_Directory ;
         -- File Path with File name in Windows
         LC$Fic := LC$Path || LC$Sep || LC$Nom ;
    --message('File info '||LC$Fic);
    -- File extension
    FType := SUBSTR(:EMP.DETAIL,INSTR(:EMP.DETAIL,'.') + 1, 4);
    -- Based on File extension will assign Windows Command
    CType := NULL; -- by default command in Windows is NULL - taken Windows default
    -- Default Command is NOT working for WINWORD
    IF UPPER(FType) IN ('DOC','DOTM','DOTX') THEN
    CType := 'WINWORD /W';
    END IF;
         -- File extraction --
    OPEN c1;
    FETCH c1 into V_EMPID;
    IF NOT PKG_TRANSFERTS.DB_To_Client
    LC$Fic ,
    'EMPLOYEE',
    'NAME',
    'EMP_ID = ' || To_Char( :EMP.EMP_ID)
    ) THEN
    Set_Alert_Property( 'AL_ERROR', TITLE, 'DB to Client' ) ;
    Set_Alert_Property( 'AL_ERROR', ALERT_MESSAGE_TEXT, 'Error transfering local file' ) ;
    LN$But := Show_Alert( 'AL_ERROR' ) ;
    Raise Form_trigger_Failure ;
    ELSE
    Message('Transferred to Client');
    END IF ;
    close c1;
    -- this command will be run from Windows
    LC$Cmd := 'cmd /c start "My script" /WAIT '|| CType||' "'||LC$Fic ||'" ';
    --message ('Host command: '||LC$Cmd);
         Ret := WEBUTIL_HOST.blocking( LC$Cmd ) ;
         LN$But := WEBUTIL_HOST.Get_return_Code( Ret ) ;
         IF LN$But <> 0 Then
              Set_Alert_Property( 'AL_ERROR', TITLE, 'Host() command' ) ;
    Set_Alert_Property( 'AL_ERROR', ALERT_MESSAGE_TEXT, 'Host() command error : ' || To_Char( LN$But ) ) ;
    LN$But := Show_Alert( 'AL_ERROR' ) ;
    LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
    Raise Form_Trigger_Failure ;
         END IF;
         -- Re-store the modified file in the database --
         LC$Fic :=LC$Fic||CAN;
    IF NOT PKG_TRANSFERTS.Client_To_DB
    LC$Fic ,
    'EMPLOYEE',
    'NAME',
    'EMP_ID = ' || To_Char( :EMP.EMP_ID)
    ) Then
    Set_Alert_Property( 'AL_ERROR', TITLE, 'Client to DB' ) ;
    Set_Alert_Property( 'AL_ERROR', ALERT_MESSAGE_TEXT, 'Error on storing file' ) ;
    LN$But := Show_Alert( 'AL_ERROR' ) ;
    Raise Form_trigger_Failure ;
    ELSE
         -- The changes are commited to Database --> Build better interface
         COMMIT;
         Clear_Message ;
         Message('File re-stored in the database /Commited', no_acknowledge ) ;      
    END IF ;     
    -- Remove the temporary local file --
         LB$Ok := WEBUTIL_FILE.DELETE_FILE( LC$Fic ) ;
         IF LB$Ok = FALSE Then
              Bell ;
              Message( 'Error removing local file ', no_acknowledge ) ;
         END IF;
         Clear_Message ;
    Exception
              When Form_Trigger_Failure Then
              Raise ;
    End Open_Doc ;
    and as i said throgh CLIENT_OLE2 ,we are able to pass value in new winword but not in stored template ..Here is the code for only new winword...
    DECLARE
    app CLIENT_OLE2.OBJ_TYPE;
    docs CLIENT_OLE2.OBJ_TYPE;
    doc CLIENT_OLE2.OBJ_TYPE;
    selection CLIENT_OLE2.OBJ_TYPE;
    args CLIENT_OLE2.LIST_TYPE;
    BEGIN
    -- create a new document
    app := CLIENT_OLE2.CREATE_OBJ('Word.Application');
    CLIENT_OLE2.SET_PROPERTY(app,'Visible',1);
    docs := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Documents');
    doc := CLIENT_OLE2.INVOKE_OBJ(docs, 'add');
    selection := CLIENT_OLE2.GET_OBJ_PROPERTY(app, 'Selection');
    message('1');
    --doc := CLIENT_OLE2.GET_OBJ_PROPERTY(doc,'ActiveDocument');
    -- insert data into new document from long item
    CLIENT_OLE2.SET_PROPERTY(selection, 'Text',:emp.emp_no);
    -- save document as example.doc
    args := CLIENT_OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(args, 'c:\temp\Employee.doc');
    CLIENT_OLE2.INVOKE(doc, 'SaveAs', args);
    CLIENT_OLE2.DESTROY_ARGLIST(args);
    -- close example.doc
    args := CLIENT_OLE2.CREATE_ARGLIST;
    CLIENT_OLE2.ADD_ARG(args, 0);
    CLIENT_OLE2.INVOKE(doc, 'Close', args);
    CLIENT_OLE2.DESTROY_ARGLIST(args);
    CLIENT_OLE2.RELEASE_OBJ(selection);
    CLIENT_OLE2.RELEASE_OBJ(doc);
    CLIENT_OLE2.RELEASE_OBJ(docs);
    -- exit MSWord
    --CLIENT_OLE2.INVOKE(app,'Quit');
    END;
    so please help ,how to pass value in that stored template which has bookmark. Seniors/guru/experts please help ,its kind urgent.Thanks

    Hi Seniors,guru,experts please help.Thanks in advance.

Maybe you are looking for

  • Transfering Adobe Acrobat 9 Pro to a new hard drive

    I had to change hard drives and now need to re-install all my application programs.  I was able to download Acrobat 9 Pro, but my licensed copy has now turned in to a 30 day trial and I don't know how to get a permanent licensed version.  When I call

  • Informatica Client Installation files on Windows 8

    I have installed informatica 9.0.1 hot fix 2 on windows 8. I installed inormatica server sucessfully. But I am having trouble installing the client. After the installation is done it says installation complete with warning. Below is the log file afte

  • Secondary colur correction mask not working! Help!

    I am currently working on Premier Pro CS6 editing a music video. I have edited my footage, fixed the tonality and I am now onto color grading it. I took the saturation down to take out the colour and applied RGB curves to add blue into the shadows an

  • Relay server does not start on IIS 8.5

    Hello, all I am trying to set up my Mobilink server to work through Relay server. The Mobilink server is currently running on the same machine as the IIS. Mobilink Relay server service is up and running. But when I try to access the rs_admin.dll in t

  • Generated SQL does not have fully qualified columnnames

    Hi, I'm trying to run a JDO query which results in: [code=-5001, state=42703] java.sql.SQLException: [SQL5001] Column qualifier or table CUSTOMER undefined. The model is basically like this: Class Order has a 1-1 relation with Class CustomerRole whic