Check directory existence

I am developing an application in Oracle Forms 6i.
What the syntax for checking the existence of a specified directory for example
'd:\oracle'

Hello,
Another way is to use a Host() command
Host('cmd /c dir /b f:\*.* > c:\test.lst');Then open the local c:\test.lst to read the content.
<p>
You can also do the same without writing any file with this Java Bean.
</p>
Francois

Similar Messages

  • Directory Existence Check Before File-Download.

    Hi,
      How to check the existence of a directory say USR/INTERFACES/HR/NONHR/SAP_TO_IFS/
    before I download a file into that particular directory using GUI_Download.
    Currently even if such a directory does not exist,
    The download is successful.
    But I want to validate the existence of the directory before the download.I tried using the FM PFL_CHECK_DIRECTORY.
    Kindly Advice.
    Thanks .

    Hello Renu
    It seems that you are mixing directories on presentation (GUI_DOWNLOAD) and application server (USR/INTERFACES/HR/NONHR/SAP_TO_IFS/).
    To check the existance of a directory on the presentation server use method cl_gui_frontend_services=>DIRECTORY_EXIST.
    This class has many more useful methods.
    Regards
       Uwe

  • Checking for existence of a record in csv file

    Hey all, I have two csv files residing on the server that I will be processing using the UTL_FILE package. One of these files (File A) has only one column and the other one (File B) has over ten. The data in file A is the same as the one in column 2 of File B. File A is mainly there for a lookup purpose whereas File B is the one that has all the data that will be processed. The following example should describe better:
    File A[b]
    Number
    "TR_56575"
    "TY_76756"
    etc
    File B
    Column1, Number, Column3, Column4
    "Mine","TR_56575","uhsht","76744"
    "Yours","TY_76756","nghdjd","45645"
    What I have to do is check whether a Number in File B exists anywhere in File A. If it does then I just skip that record and move on to the next. So basically, I wanted to find out if there is any way to compare the two columns on the server side. I know there is a dbms_lob.fileexists function to check the existence of a file on a server, just wanted to see if there is an extension to that or something that checks the existence of a string in file. Any feedback would be appreciated. Thanks.

    Yeah I thought about that. It would be the ideal way to go, however in this case, I already have a Pl/Sql procedure that grabs File B and just processes it from the server. It works fine and everything but now that this extra logic and file is added where I have to check the existence of a corresponding record in File A, I'm just looking for something to add in my code to just make the comparison on the fly and the rest would be the same.

  • I had downloaded Mountain OX and installed it on my macbook air.  The notes app is now not working.  I get the following message erminating app due to uncaught exception 'MFSQLiteException', reason: 'checking for existence of object' abort() called termin

    i had downloaded Mountain OX and installed it on my macbook air.  The notes app is now not working.  I get the following message
    "Terminating app due to uncaught exception 'MFSQLiteException', reason: 'checking for existence of object'
    abort() called
    terminate called throwing an exception"
    Can someone help me with solving the problem.

    i had downloaded Mountain OX and installed it on my macbook air.  The notes app is now not working.  I get the following message
    "Terminating app due to uncaught exception 'MFSQLiteException', reason: 'checking for existence of object'
    abort() called
    terminate called throwing an exception"
    Can someone help me with solving the problem.

  • Check Index Existence - Trex SOLMAN Solution Database Issue

    Hi Experts,
    I have done all the configuration part for having solution database functionality in SAP SOLMAN system. Our basis team has also installed TREX successfully.
    But while checking in transaction CRMC_SAF_TOOL, everything is green except Check ndex Existence.
    We are getting the below error messages:
    Failed [Check=Index Existence ,Knowledge Base=SDB ,Language=E]
    Failed [0 ]
    Failed [No. of Documents=1-]
    On discussion with Basis Team, I came to know that Indexes are getting created at putty level and while going to the indexes (Menu - Goto- Indexex (F8) in CRMC_SAF_TOOL, everything is seems to be fine and successful. No error there.
    Please suggest where I am going wrong as I am still not able to search in IS02.
    Thanks & Regards,
    Madhu

    Hello,
    Sometimes this error is seen when an older version of Trex being used.
    Are you on a current version of Trex? If not you may want to consider upgrading to a current version?
    Additionally, sometimes documents saved via content management cannot be indexed,
    as no url can be determined for them.
    4. knowledgebase SDB_ATTACHMENT:
       The URL's do not get determined and this is why nothing would be
       put to TREX.
       Herefore, please follow the following note:
       685521 Logon data for /sap/bc/contentserver service
    This may explain the HTTP:/no. DOcuments =1- error ???
    So please ensure you have set the URL for the content server as per Note 685521
    Regards,
    Paul

  • Check table existence method

    I have the following Java method that is suppose to determine whether a given table exists or not:
    public boolean tableExists(String table) {
    String defstmt = "select TABLE_NAME from ALL_TABLES where (TABLE_NAME = '" + table + "')";
    System.err.println("tableExists: stmt = " + defstmt);
    tc.executeSEL(defstmt);
    ResultSet rs = tc.getRS();
    String tname = new String();
    try {
    while (rs.next()) {
    rs.getString(tname);
    System.err.println("tableExists.try: tname = " + tname);
    rs.close();
    return true;
    catch (SQLException ex) {
    System.err.println("tableExists.catch: tname not found");
    try {
    rs.close();
    catch (SQLException ex1) {
    return false;
    Since this one didn't appear to work reliabily a friend suggested the following:
    public boolean tableExists(String table) {
    boolean exists = false;
    String defstmt = "select TABLE_NAME from ALL_TABLES where (TABLE_NAME = '" + table + "')";
    System.err.println("tableExists: stmt = " + defstmt);
    if (tc.executeSEL(defstmt)) {
    ResultSet rs = tc.getRS();
    try {
    exists = rs.first();
    // This returns false if the rs is empty
    // This should be sufficient if the query will return zero rows or one row.
    // If there's a possibility that the query could return more than one row
    // (for example if multiple schema data is in there and a table name
    // might be duplicated), then this section will need to be more picky.
    System.err.println("tableExists.try: tname found");
    catch (SQLException ex) {
    System.err.println("tableExists.catch: tname not found");
    try {
    rs.close();
    catch (SQLException ex1) {
    return exists;
    Bottom line; neither method seems to be able to determine whether the table exists. Someone out there got any suggestions?
    Thanks in advance
    RCulp

    The method "tc.executeSEL" is in a class "TableConnector" which I use to hold connection data and execute SQL statements. A new instance of the "TableConnector" class is created for each table prior to the check for existence. The method itself is boolean, returning true or false if the SQL runs successfully:
    public boolean executeSEL(String inpstmt) {
    rs = null;
    try {
    Connection conn = ConnectionData.getConnectionData().openConnection();
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
    rs = stmt.executeQuery(inpstmt);
    return true;
    //debugdumpRS(rs);
    catch (SQLException ex) {
    System.err.println("SEL Statement = " + inpstmt);
    System.err.println("Error code = " + ex.getErrorCode());
    System.err.println("Error message = " + ex.getMessage());
    System.err.println("SQL state = " + ex.getSQLState());
    return false;
    /*FINALLY CAN NOT BE USED HERE; ERASES THE RESULT SET
    finally {
    if (stmt != null) {
    try {
    stmt.close();
    catch (SQLException ex) {
    System.err.println("Error code = " + ex.getErrorCode());
    System.err.println("Error message = " + ex.getMessage());
    The TableConnector class also has a get method for the ResultSet:
    public ResultSet getRS() {
    return rs;
    I'll try your suggestion and post the result.
    Thanks
    RCulp

  • Is there any FUNCTION I can use to check the existence of a USER?

    Hi,
    Is there any FUNCTION I can use to check the existence of a USER? I dont want to write a function by myself to access usr01 directly.
    Thanks in advance.

    You can use FM USER_EXISTENCE_CHECK
    Thanks
    Seshu

  • How to check (programmatic) existence of a method in a class implementation

    Hi
    I need to check the existence of method in a class in a programmatic way and call it only when it is available otherwise proceed with subsequent steps in my ABAP OO Program. Is there way to do it? This is needed in a customer exit situation and each task is implemented with method and not all tasks would have methods implemented.
    Any feedback is greatly appreciated.
    Thanks

    When you try to call the method dynamically and ifthe method doesn't exist, system would complain by raising the exception cx_sy_dyn_call_illegal_method. You can Catch this exception when you call the method.
    CLASS lcl_test DEFINITION.
      PUBLIC SECTION.
        METHODS:
          check_exist.
    ENDCLASS.                    "lcl_test DEFINITION
    DATA: lo_test TYPE REF TO lcl_test.
    DATA: lv_method TYPE char30.
    lv_method = 'GET_DATA'.
    CREATE OBJECT lo_test.
    TRY.
        CALL METHOD lo_test->(lv_method).
      CATCH cx_sy_dyn_call_illegal_method.
    ENDTRY.
    CLASS lcl_test IMPLEMENTATION.
      METHOD check_exist.
      ENDMETHOD.                    "check_exist
    ENDCLASS.
    Regards,
    Naimesh Patel

  • How to check the existence of DB400 library from java

    Hi all,
    I actunally need to validate a DB400 library via java. so is there any way to check the existence of DB400 library from java side.
    Thanks in advance.

    Hi Sarvan,
    You might not even need a function to tell you if a record exists or not.
    Here in below example i do a check with exists .you will find couple of other ways too..
    create table t as select * from emp where deptno=10now i set salary of every person present in table 'T' to 1111 in emp table.
    update emp e
    set sal=1111
    where exists
            (select 1
              from t
              where t.empno=e.empno) Remember that plain SQL will always outperform PLSQL.
    Hope it helps
    CKLP
    Edited by: CKLP on Sep 26, 2011 3:41 AM

  • How to check the existence of file without any error dialog?

    Hi everybody,
    I am trying update some labview programs from LV6.1 to LV7.1, I used the
    function "File/Dictionary Info" to check if the file
    exists or not (if the size=0 then file does not exist), and it ran well with
    LV6.1, but now it shows every time a labview error dialog
    about "LabView: file not found..." with 7.1, if this file dosn't exist.
    Sometimes I feel that it is really stupid to show the dialog, because I
    can write handling by myself, if the error should be handled, and
    I don't want all the process is interrupted because of such dialogs. Is
    there any way to shut the dialog down or check the existence of
    file smoothly?
    Thanks a lot!
    L.Wang

    Hello,
    The dialog is probably appearing because you have Auto Error Handling turned on.  This feature is turned on by default in LabVIEW 7.0.  You should go to VI Properties (Ctrl-I) > Execution and deselect "Enable automatic error handling".  Also you should go to Tools > Options > New and Changed in LabVIEW 7.x and deselect "Enable automatic error handling in new VIs".  If you never want to see one of those dialogs again, you can also deselect "Enaeble automatic error handling dialogs"...I wouldn't recommend this, however, as you would never know if one of your VIs had this setting enabled...you would only find out once somebody else tried to use your VI on another LabVIEW install.
    -D
    Darren Nattinger, CLA
    LabVIEW Artisan and Nugget Penman

  • Procedure to check the existence of Indexes

    I have a procedure whcih drops all the indexes, when the same procedure is executed again, it gives error "object does not exists" (obviously)
    I want to avoid this error, how can I check the existence of index inside the procedure, so that the procedure will check if the index exists before deleting the index?
    Is there a ready-made procedure available for such scenario?
    Thanks in advance

    The other approach is to catch the exception in your script, i.e.
    BEGIN
      EXECUTE IMMEDIATE 'DROP INDEX <<index name>>';
    EXCEPTION
      WHEN OTHERS THEN
        -- Drop failed.  Do something to record the failure.
        NULL;
    END;Now, most of the time, you'll want to catch a few specific exceptions and you'll want to do something when you catch them (i.e. generate a log entry).
    Justin

  • Programmatically check the existence of objects in the system

    Hi,
    Is there a way to programmatically check the existence of objects? The idea is I'll accept a list of names of objects and their object types and then programmatically check their existence in the system?
    Can you point me to a resource on how to do it?
    Thanks in advance.
    --Carl

    Hi.
    All custom objects (z, y) being referred to a program. May it be z or y table, data element, domain, sapscript form, function module/group.
    The goal is actually to be able to transport a program from a source machine to a target machine. The objects being referred to from the program must also be transported, of course, for it to run properly. Thus, the need to check the objects' existence.
    Thanks.
    --Carl

  • Check for existence of a record

    I have a table XX_TEMP. Let us say the columns are inventory_item, organization_id and description
    The values are:
    Inventory_item
    Organization
    Description
    200
    m1
    Sample
    200
    m2
    Not Sample
    400
    m4
    check
    700
    m5
    Test
    I just want to check the existence of an item in the table, I have written two queries and would like to know which one is better in terms of performance:
    Q1:
    select count(1) from xx_temp where inventory_item=200 and rownum=1;
    Q2:
    select count(1) from dual where exists (select 1 from xx_temp where inventory_item=200);
    Both Q1 and Q2 return the same result. In fact, I was surprised with the result from Q1 as I expected that the rownum would be evaluated after the where condition. I expected Q1 to return 2
    I thought that the below query:
    select count(1) from xx_temp where inventory_item=200;
    and Q1 would return the same result as rownum would be evaluated at end. In effect, I've 2 questions:
    1. Isn't rownum calculated at the end?
    2. What is the best way in terms of performance to check for an existence of record?

    Internally this is how it works:
    select count(*) from xx_temp where inventory_item=200 and rownum=1;
      COUNT(*)
             1
    1 row selected.
    Execution Plan
       0       SELECT STATEMENT Optimizer Mode=ALL_ROWS (Cost=4 Card=1 Bytes=13)
       1    0    SORT AGGREGATE (Card=1 Bytes=13)
       2    1      COUNT STOPKEY
       3    2        TABLE ACCESS FULL XX_TEMP (Cost=4 Card=2 Bytes=26)
    Statistics
              5  user calls
              0  physical read total multi block requests
              0  physical read total bytes
              0  cell physical IO interconnect bytes
              0  commit cleanout failures: block lost
              0  IMU commits
              0  IMU Flushes
              0  IMU contention
              0  IMU bind flushes
              0  IMU mbu flush
              1  rows processed
    Plan
    1 Every row in the table XX_TEMP  is read.
    2 Processing was stopped when the specified number of rows from step 1 were processed.
    3 The rows were sorted to support a group operation (MAX,MIN,AVERAGE, SUM, etc).
    4 Rows were returned by the SELECT statement.
    COUNT STOPKEY knows how many rows you want and will just keep calling its child function under it in the execution plan tree to get more and more rows, until the required amount of rows have been returned. Here it stopped at 1 iteration.
    And to answer your second question : as to which is the fastest way to to check  for an existence of record :
    Answer would be it depends on your requirement.  possible answers are :  Rowid --  fastest way to check for a row.   similar answers can be Index etc.. but all this is relative to what you work with.
    Cheers,
    Manik.

  • [svn:bz-trunk] 23143: Certain code needs to check the existence of the class validation validator  (some brokers and other listeners) during message broker init, however the validator was not being created till the very end of the method .

    Revision: 23143
    Revision: 23143
    Author:   [email protected]
    Date:     2011-10-27 06:31:02 -0700 (Thu, 27 Oct 2011)
    Log Message:
    Certain code needs to check the existence of the class validation validator (some brokers and other listeners) during message broker init, however the validator was not being created till the very end of the method.  Promote it to be at the top instead of at the bottom.
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/config/MessagingConfiguration.java

    Revision: 23143
    Revision: 23143
    Author:   [email protected]
    Date:     2011-10-27 06:31:02 -0700 (Thu, 27 Oct 2011)
    Log Message:
    Certain code needs to check the existence of the class validation validator (some brokers and other listeners) during message broker init, however the validator was not being created till the very end of the method.  Promote it to be at the top instead of at the bottom.
    Modified Paths:
        blazeds/trunk/modules/core/src/flex/messaging/config/MessagingConfiguration.java

  • Check directory exists

    I wonder if anyone could help.
    I am trying to check the existence of a file by using the following code:
    <% if new File("C:\\Program Files\\File name\\document.pdf").exists()) %>
    <% { %>
    <% } %>
    However, my code is processed whether the file exists or not.
    Does anyone have any ideas please?
    Regards,
    Nathan

    Thanks for the advice, however I tried as you suggseted and this still didn't work.
    It seems very strange, because I have entered the file to check for existence as "kjgjkgjkg.pdf" (which I know doesn't exist), and the processing inside the file exists validation is still processed.
    I have debugged the program, and the new File object does not contain the backslash's where it should.
    Do I need to import any java objects for this to work?

Maybe you are looking for

  • HP 4050tn and OS 10.4.5

    Once I upgraded my OS to 10.4.5 I am no longer able to pull paper from tray 3 or 4 on my HP 4050tn printer. Even though I select tray 3 or 4 the paper is always pulled from tray 2. I have tried the 'Reset Printing System' and adding the printer again

  • What are the major differences between the air and the pro

    what are the major differences between the air and the pro?

  • Zero Value Line Item in the accounting document

    Hi Experts When I create an accounting doc from Invoice, system adds a new accounting line with 0 value and posts as below Itm   PK   Account     Account short text                 G/L acct short text             Tx          Amount         50   50000

  • L.R No and Date /W.B.S.T No in Sales Document

    Hi All, Where do we maintain 1. L.R No( Delivery Header/ Shipment Tab/ Bill of Lading) and it's Date which we receive from transpoter. 2.In which screen and table we can get  W.B.S.T No , VAT No and CST No of the company/plant wise. Regards Debasish

  • IBM's TSpaces probably deadlocks in Web Logic 5.1.0 sp 8

    Hi, In our Web Logic 5.1.0 sp8 installation we have a tuple space (IBM's TSpaces) solution to connection to a number of external servers. On top of Web Logic we use a tomcat web server. When we stress test system with 10 testers (5 concurrent), the s