Check if the file exists in the local machine...

Hi,
I am getting a problem while checking if the local file exists or not. In the first case the server is same as my local machine. When I try to test if the file exists or not using FILE.exists() it works because I am looking for the file in my machine.
But when I move the code in Unix the file.exists( ) tries to look in the unix box and not the local machine. My question is how to read it from the local machine?
We are using jdk v1.2.2 and Iplanet App server v6.0.
Thanks
Amol

What do you mean by "when I move the code in UNIX..."?

Similar Messages

  • How to check whether a file exist in the program folder or not?

    Hi guys,
    how to check whether a file exist in the program folder or not? Let is say i recieve a file name from user then i want to know if the file is there not and act on that base.
    abdul

    Look at the class java.io.File and the .exists() method:
    http://java.sun.com/j2se/1.4/docs/api/java/io/File.html

  • Getting Datapump Export Dump file to the local machine

    I apologize to everyone as this is a duplicate post.
    Re: Getting Datapump Export Dump file to the local machine
    My initial thread(started yesterday)was in 'Database General' and didn't get much response today. Where do i post questions on EXPORT/IMPORT utilities?
    Anyway, here is my problem:
    I want to take the export dump of itemrep schema in orcl database (in a remote machine). I have an Oracle server (10G Rel2) running in my local Windows machine. I have created a user john with necessary EXPORT/IMPORT privileges in my local db. Then i created a Directory object,ie a folder named datapump in my local hard drive and granted READ WRITE privileges to john.
    So john, who is a user in my local machine's oracle db is going to run the expdp utility.
    expdp john/jhendrix@my_local_db_alias SCHEMAS=itemrep directory=datapump logfile=itemrepexp.log
    The above command will fail because it will look for itemrep schema inside my local db, not the remote db where the itemprep is actually located. And you can't qualify the schemaname with its db in the SCHEMAS parameter (like SCHEMAS=itemrep@orcl).
    Can anyone provide me a solution for this?

    I think you can initiate the datapump exp utility from your client machine to export a schema in a remote database.But, Upon execution,oracle looks for the directory in the remote database and not on your local machine.
    You're inovoking expdp from a client (local DB) to export data from a remote DB.
    So, With this method, you can create the dumpfiles only on the Remote server and not on the local Machine.
    You can perform a direct import instead of export using the NETWORK_LINK option.
    Create a DBlink from your local and Remote DB and verify the connection.
    Then,Initiate the Impdp from Your local machine DB using the parameter network_link=<db_link of the Remote DB> to import the schema.
    The advantage of this option eliminates the Dumpfile creation at the Server side.
    There are no dumpfiles during the import process. the Data is imported directly to the target schema.

  • Save a .wid file to the local machine.

    hello,
    I've just started developing a java jsp client using BO report engine sdk.
    I'm looking for a way to retrieve a .wid from the CMS and save it on the local machine.
    I have been looking around in the forum and I have seen that it could be done using [IIObject.getFiles()|Re: Save Webi Document Locally] collection.
    I'm still new to BO programming so I need a hint on how to implement this.
    Thank you.
    Regards.
    Bob

    Hey Leo,
    Actually, I found a KnowledgeBase article on our website which describes this exact process, and it's not necessary to modify the UUT container. I tried this method and was successful in saving the ASCII report to the table. This KB mentions a ModelNumber parameter as its example. Instead, for our situation, I made a new Local variable in my process model called "ASCIIReport" and stored the value of Locals.Report in there as soon as the report is generated. Then I log this Locals.ASCIIReport variable to the database using the method described in the KB. It appeared to work properly.
    Also, please note that this method is only valid for the TestStand 2010 and older process models. In newer versions of TestStand, we've changed the way reporting and database logging works to use a plugin architecture, and this is partially what Scott was referring to when he mentioned that these two features don't "know" about each other. If you're currently using the TestStand 2012 or newer process model, or if you plan to migrate to those models in the future, further work will be required to log the text report to the database. The method in the linked KB should work for the legacy models, however.
    Daniel E.
    TestStand Product Support Engineer
    National Instruments

  • The OraOledb.Oracle is not registered on the local machine.

    Hi Everyone,
    I am having Windows XP operating system with Service pack 2 on my computer. I also using Microsoft.Net 2003 & Oracle 9.x for creating a client-server Application. I installed the Oracle provider from OraWin9204.exe which i was downloaded from the Oracle's site. But I am getting the above mentioned problem "The OraOledb.Oracle is not registered on the local machine", while i m executing the open method of the Connection object of ADO.NET. I also checked the permission on ora92 (ORACLE HOME DIRECTORY) folder and gave full control to my username. But the problem remains same.
    Can anybody have any idea? Please help me on [email protected]
    Thanx
    Rahul Ratnaker

    make manual registration of following file.
    [oracle_Home]\ora92\bin\OraOLEDB.dll
    Enjoy
    Rahul Ratnaker

  • Utl_file.open_file question to check if a file exists and is not empty

    Hello,
    I am trying to write a code where in 3 seperate files are created based on some parameter condition for the extract call.
    Say the parameters are NULL, 'A' and 'B'.
    When Null condition is passed to the extract call then it should create file A and B if records are found. If not it should create empty files.
    It is possible that the parameter to the extract is just 'A' then it would create A with say non zero file and B with zero file.
    Now when the extract is called with 'B' parameter and if the file A already exists and is not empty then I should not touch/overwrite it with empty records.
    Is there any simple way that I can do this to check if a file exists and is non empty?
    I am using
    open_file
    ( gv_utl_file_path
    ,lv_file_name
    ,lv_file_handle
    Please help.
    Thanks

    @OP : No Need to open
    SQL> declare
      2   lb_file_exist boolean;
      3   ln_size number;
      4   ln_block_size number;
      5  begin
      6   sys.utl_file.fgetattr('TEST_DIR','a.txt',lb_file_exist,ln_size,ln_block_size);
      7   if lb_file_exist then
      8    dbms_output.put_line('a Exists');
      9    dbms_output.put_line(to_char(ln_size));
    10   else
    11    dbms_output.put_line('a Not Exists');
    12   end if;
    13   sys.utl_file.fgetattr('TEST_DIR','b.txt',lb_file_exist,ln_size,ln_block_size);
    14   if lb_file_exist then
    15    dbms_output.put_line('b Exists');
    16    dbms_output.put_line(to_char(ln_size));
    17   else
    18    dbms_output.put_line('b Not Exists');
    19   end if;
    20   sys.utl_file.fgetattr('TEST_DIR','c.txt',lb_file_exist,ln_size,ln_block_size);
    21   if lb_file_exist then
    22    dbms_output.put_line('c Exists');
    23    dbms_output.put_line(to_char(ln_size));
    24   else
    25    dbms_output.put_line('c Not Exists');
    26   end if;
    27  end;
    28  /
    a Exists
    0
    b Exists
    3
    c Not Exists
    PL/SQL procedure successfully completed.Edited by: jeneesh on Mar 30, 2012 1:21 AM

  • How can I check if a file exists in CVI Real Time?

    It would also be nice if the help file designated whether functions were supported in real time or now.
    I tried this:
        if(GetFileAttrs (DataFileName,NULL,NULL,NULL,NULL) == -1)
    Michael Chadwell
    Department of Engine and Vehicle R&D
    Southwest Research Institute
    Solved!
    Go to Solution.

    You can check if a file exists in CVI Real-Time using GetFileInfo function.
    The CVI help provides a list of functions available on CVI Real-Time here: CVI Real-Time Functions
    National Instruments
    Product Support Engineer

  • JavaScript: How to check if a file exists.

    Hello Everybody,
    Can you tell me how to check if a file exists using JavaScript and Internet Explorer.
    Browsing on this website I could read about the command "f.exists()" and it was necessary to include "java.io.*".
    Should I use this same command and should I include the same files? Or are there other files and other commands?
    Thanks in advance.

    sorry ya. there is no command to check whether a file exists using javascript. The following code says the object name and value. But it can't say whether the file exists in the harddisk or .. Javascript cannot access database and system resources. If the file exists or not can be checked through the application (ASP, CFML, ..) you are using.

  • "The 'VFPOLEDB.1' provider is not registered on the local machine" in SSRS 2008

    Hi,
    I installed Visual Foxpro OLE DB driver for accessing dbf file and tried to get the data from the dbs file through BIDS.
    I made one report using BIDS its working fine.
    But once i deployed this report to SSRS its giving an error that “The 'VFPOLEDB.1' provider is not registered on the local machine."
    My SQL Report services is 64 bit i realaized that Visual Foxpro OLE DB will not work in 64 bit application.
    Its there any work arround for these kind of issue. I need to keep 64 bit ssrs because this is production server other reports are there.
    Please let me know is there any solution.

    Hi iqbalkmk,
    As you know the report designer is 32 bit, if you have installed the 32 bit data provider it will works fine in the designer but not work on the 64 bit report server.
    When you deploy a report to a 64-bit report server (x86), the report server must have natively compiled 64-bit data providers installed. Wrapping a 32-bit data provider in 64-bit interfaces is not supported.
    In your scenario, please try to do below setting to have a try:
    Click the IIS manager in the start.
    Edit the Advanced Properties of the application pool in which the application is running and set "Enable 32-Bit Applications" to "True".  If you don't do this you see the error message that kicked off this whole thread.
    More details information:
    Data Sources Supported by Reporting Services (SSRS)
    Similar thread for your reference:
    The 'VFPOLEDB.1' provider is not registered on the local machine
    The 'VFPOLEDB.1' provider is not registered on the local machine
    If you still have any problem, please feel free to ask.
    Regards
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • I need help with Active Content running in the local machine

    Hey. I'm in a dead line ... and I'm in trouble: I programmed
    a web-site with a flash-menu that uses getURL to connect with the
    pages. This web work in the internet but doesn't in the local
    machine. I need to distribute it in a CD also, so i need the menu
    working in the local machine. I'd tried all the tricks i found in
    internet but....no success. Any suggestion....Thanks a lot.

    quote:
    I could make suggestion, but honestly ... I'm afraid I'll
    only say
    something you've already seen! I mean, *all* the tricks on
    the Internet?
    lol That's a lot. Have you tried inserting the "mark of the
    web" on the
    HTML page that contains the SWF?
    http://msdn.microsoft.com/en-us/library/ms537628(VS.85).aspx
    In Dreamweaver, see Commands > Insert Mark of the Web.
    David Stiller
    Adobe Community Expert
    Dev blog,
    http://www.quip.net/blog/
    "Luck is the residue of good design."
    Of course I did. Anyway, in theory it will work only in
    Explorer, but i have the same problem with the other navigators.
    The problem is very simple: if I publish de flash-menu for
    ACCESS LOCAL FILES ONLY I resolve the problem, but i lost the GET
    variables than I'm using for trace the option selected in the menu
    to mark it in the next page. In the other hand, if i publish for
    ACCESS NETWORK ONLY simply the menu doesn´t work in a local
    machine in any of the navigators.
    I'm desperately seeking Su...sorry, Solution. (lol)

  • Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine. at System.Data.OleDb.OleDbServicesWrapper

    HI
    when i copy asp.net 3.5  application  from IIS7 to IIS 8 in windows server 2012 and browse the application and try to save data in oracle , i  get following error in Event viewer
    Log Name:      Application
    Source:        ASP.NET 4.0.30319.0
    Date:          4/6/2015 2:53:21 PM
    Event ID:      1309
    Task Category: Web Event
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      TSharepint2013.test.com
    Description:
    Event code: 3005 
    Event message: An unhandled exception has occurred. 
    Event time: 17/06/36 02:53:21 ? 
    Event time (UTC): 17/06/36 11:53:21 ? 
    Event ID: 34f214e1dcdf45f5ad8450739c954494 
    Event sequence: 24 
    Event occurrence: 1 
    Event detail code: 0 
    Application information: 
    Process information: 
        Process ID: 18724 
        Process name: w3wp.exe 
        Account name: TEST\splaw 
    Exception information: 
        Exception type: InvalidOperationException 
        Exception message: The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
       at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
       at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
       at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.OleDb.OleDbConnection.Open()
       at printLawsuit.RetJudgement(Int32 x) in C:\inetpub\wwwroot\wss\VirtualDirectories\Law\ExecutionReq\printLawsuit.aspx.vb:line 2374
       at printLawsuit.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\wss\VirtualDirectories\Law\ExecutionReq\printLawsuit.aspx.vb:line 44
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Request information: 
     Request URL: http://-----:50/executionreq/printLawsuit.aspx 
        Request path: /executionreq/printLawsuit.aspx 
        User host address: ---3.184 
        User:  
        Is authenticated: False 
        Authentication Type:  
        Thread account name: TEST\Spfarm 
    Thread information: 
        Thread ID: 16 
        Thread account name: TEST\Spfarm 
        Is impersonating: False 
        Stack trace:    at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper& datasrcWrapper)
       at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
       at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.OleDb.OleDbConnection.Open()
       at printLawsuit.RetJudgement(Int32 x) in C:\inetpub\wwwroot\wss\VirtualDirectories\Law\ExecutionReq\printLawsuit.aspx.vb:line 2374
       at printLawsuit.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\wss\VirtualDirectories\Law\ExecutionReq\printLawsuit.aspx.vb:line 44
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    Custom event details: 
    Event Xml:
    <Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
      <System>
        <Provider Name="ASP.NET 4.0.30319.0" />
        <EventID Qualifiers="32768">1309</EventID>
        <Level>3</Level>
        <Task>3</Task>
        <Keywords>0x80000000000000</Keywords>
        <TimeCreated SystemTime="2015-04-06T11:53:21.000000000Z" />
        <EventRecordID>174735</EventRecordID>
        <Channel>Application</Channel>
        <Computer>TSharepint2013.test.com</Computer>
        <Security />
      </System>
      <EventData>
        <Data>3005</Data>
        <Data>An unhandled exception has occurred.</Data>
        <Data>17/06/36 02:53:21 ?</Data>
        <Data>17/06/36 11:53:21 ?</Data>
        <Data>34f214e1dcdf45f5ad8450739c954494</Data>
        <Data>24</Data>
        <Data>1</Data>
        <Data>0</Data>
        <Data>/LM/W3SVC/3/ROOT/ExecutionReq-1-130727947211114471</Data>
        <Data>Full</Data>
        <Data>/ExecutionReq</Data>
        <Data>C:\inetpub\wwwroot\wss\VirtualDirectories\Law\ExecutionReq\</Data>
        <Data>TSHAREPINT2013</Data>
        <Data>
        </Data>
        <Data>18724</Data>
        <Data>w3wp.exe</Data>
        <Data>TEST\splaw</Data>
        <Data>InvalidOperationException</Data>
        <Data>The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine.
       at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper&amp; datasrcWrapper)
       at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
       at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal&amp; connection)
       at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions)
       at System.Data.ProviderBase.DbConnectionInternal.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
       at System.Data.OleDb.OleDbConnection.Open()
       at printLawsuit.RetJudgement(Int32 x) in C:\inetpub\wwwroot\wss\VirtualDirectories\Law\ExecutionReq\printLawsuit.aspx.vb:line 2374
       at printLawsuit.Page_Load(Object sender, EventArgs e) in C:\inetpub\wwwroot\wss\VirtualDirectories\Law\ExecutionReq\printLawsuit.aspx.vb:line 44
       at System.Web.UI.Control.LoadRecursive()
       at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
    </Data>
        <Data>http://----:50/executionreq/printLawsuit.aspx</Data>
        <Data>/executionreq/printLawsuit.aspx</Data>
        <Data>10.169.3.184</Data>
        <Data>
        </Data>
        <Data>False</Data>
        <Data>
        </Data>
        <Data>TEST\Spfarm</Data>
        <Data>16</Data>
        <Data>TEST\Spfarm</Data>
        <Data>False</Data>
        <Data>   at System.Data.OleDb.OleDbServicesWrapper.GetDataSource(OleDbConnectionString constr, DataSourceWrapper&amp; datasrcWrapper)
       at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
       at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
       at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, 
    </Data>
      </EventData>
    </Event>
    adil

    Hi,
    As this question is more relate to iis, I suggest you post it to IIS Forum, you will get more help and confirmed answers from there.
    http://forums.iis.net/
    Best regards
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]

  • Reading the output from a object running in the local machine.

    Reading the output from a object running in the local machine.
    By using a signed applet i am lunching a small application that returns an image object, how to read that without storing it in the hard disk.
    Which means i need to read the image object return by the local application using applet or jsp .
    i am using tomacat and an html page with an applet with it to lunch the application.

    You can write that image in a binary format using OutputStream for System.out and then read it in your applet.

  • The 'IBMDADB2' provider is not registered on the local machine.

    Hi Experts,
    Need you help on this
    I am trying to migrate an application from Windows Server 2003 (32 Bit), IIS 6 to  Windows Server 2008 R2 (64 Bit), IIS 7.
    But i am getting The 'IBMDADB2' provider is not registered on the local machine error  when i am trying to connect to DB2 via application. However i am able to connect to DB2 directly via DB2CMD.
    "Provider=IBMDADB2; User ID=xxx; Password=yyyy; Data Source=zzzz; hostname=aaaa;"
    Request your help on the same.
    Thanks in Advance.

    Hi Hari,
    This forum is for Team foundation server, which it's not related to your question. Please open a new thread in corresponding forums that you used for the application.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • The 'ORAOLEDB.ORACLE' provider is not registered on the local machine.

    Sir,
    I am having my oracle 11g 64 bit database in RHEL linux 64 bit server. My Visual Studio .Net 2008 64 bit application is running in server having Windows server 2008 64 bit OS and oracle 11.2.0.2.0 client 64 bit.
    When I try to connect the database through the oracle client its working fine and I am able to connect through the development mode of visual studio 2008. But when I try to run in the IIS the following error is coming:
    The 'ORAOLEDB.ORACLE' provider is not registered on the local machine.
    Kindly help me
    Thanks in advance
    n v r

    This is not an Oracle database problem, never mind a database server language (PL/SQL or SQL) problem.
    The problem you've described is with a Microsoft product, Visual Studio 2008. The server you refer to is Microsoft IIS. The error you list is an error with a Microsoft proprietary technology called OLEDB (part of Microsoft's <i>Component Object Model</i>).
    Just where does Oracle PL/SQL and SQL languages, the subject matter of this forum, feature in your problem with Microsoft proprietary technology?

  • How do I load a JPG from the local machine into BitmapData class?

    Hi All,
    I have some code below :
    I use the linkage id of jpg's which are present in my
    library. Is there any way i can use jpg's from the local machine's
    C drive? Like BitmapData.loadBitmap("C:/xxx.jpg")??
    I need to use the pixelDissolve effect and this is done by
    the BitMap class. And I can find only linkage id reference and no
    loading from path.
    Regards
    Roshan Kolar

    you can load jpg into a target movieclip, use that target
    movieclip and the draw() method of the bitmapdata class to create a
    bitmap of the image and apply the pixeldissolve() method to that
    bitmap.

Maybe you are looking for