How to synchronize a local file with the remote copy.

I have a local file (file.txt) inside the directory of my java application and also a copy in a remote machine. Every time I start the application I want to check if the remote copy has been updated and if yes, synchronize the local copy. If you have done this before, please let me know. Thank you very much!

you could make a URL connection to that file, check it's lastModified date, and download if you need to update

Similar Messages

  • How to delete a local file in the presentation server.

    Hi All,
    How to delete a local file in the presentation server. As we do using 'delete dataset dsn' in application server. How can i achieve this. My requirement is after uploading file using gui_upload, i want to delete that source file. Please let me know, how can i achieve this.
    Thanks in advance.
    Regards,
    Vishal

    data: l_rc type i.
      data: f_name type string.
        move 'c:\YourFile.txt' to f_name.
        CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_DELETE
          EXPORTING
            FILENAME             = f_name
          CHANGING
            RC                   = l_rc
         EXCEPTIONS
           FILE_DELETE_FAILED   = 1
           CNTL_ERROR           = 2
           ERROR_NO_GUI         = 3
           FILE_NOT_FOUND       = 4
           ACCESS_DENIED        = 5
           UNKNOWN_ERROR        = 6
           NOT_SUPPORTED_BY_GUI = 7
           WRONG_PARAMETER      = 8
           others               = 9
        IF SY-SUBRC <> 0.
        MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                   WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.

  • How to refresh a local file in the Reporting Studio?

    Hello,
    I need to refresh a few local files in the Reporting Studio via script, but obviously command
    ActiveDocument.Sections["Sectionname"].Process()
    does not work, since it's not a query. What else could I use?
    Many thanks for any answer.

    I am confused...How is the solution not exactly what I look for ?
    You asked how to refresh imported data files via script.
    You correctly identified that the Imported file is not a Query.
    However if you look at the Object model closely you will notice properties that if you can think outside the box will allow you to treat the imported file like a query section.
    ActiveDocument.Sections["data.csv"].ProcessSequenceNum
    ActiveDocument.Sections["data.csv"].IncludeInProcessAllBy strategically setting unwanted sections not to process via
    ActiveDocument.Sections["Sectionname"].IncludeInProcessAll = falseand setting targeted section(s)...imported file(s) to process via
    ActiveDocument.Sections["Sectionname"].IncludeInProcessAll = trueThen
    ActiveDocument.ProcessAll()Your section(s) will refresh.
    If this is not a satisfactory solution then move the data files to a database or create a DSN entry and OCE to those files instead of importing them.

  • How to repair corrupted xp files with the Toshiba recovery dvd pkg

    Hello all, my Satellite a105-s4054 has some corrupted xp os files.  Please advise on how to repair only these files using the recovery dvd pks included with my sytem.  I would rather not have to do a complete format and install.   And it is now obvious which of the individual files listed should be replaced to repair the corrupted files. 
    Is there  way to just replace the corrupted files?
    Thank you

    Satellite A105-S4054 
    ..replace the corrupted files?
    If they are system files, this will fix them.
       Description of Windows XP and Windows Server 2003 System File Checker (Sfc.exe)
    -Jerry

  • How can I create a file with the excel file type?

    I work with forms 4.5 and I could create "TEXT_IO.FILE_TYPE", but with this I make a I/O TEXT file not a file with the characteristics from a excel file! Can somebody help me please?!?!?
    Best regards,
    Chris from Portugal

    The extension file must be 'CSV' and not 'CVS'. It's better to separate your items by a ';'
    The HOST command you have to execute after creating the file it's HOST(EXEL_PATH SPACE YOUR_FILE) OR Open the DOS PROMPT and type: Exel your_file_name.

  • How can I overwrite a file with the same name in Content DB?

    Hi All,
    In Content DB if I upload a file with the same name as a previous one, the application shows the warning message:
    " ...You cannot upload "XXXXXX.doc" to "Test 1" because an item with the same name already exists ..."
    And the alternatives are "Create Version" or "Cancel" the operation. Is there any way to overwrite a previous file as we can do it in Oracle Files ?
    Regards
    Harvey

    Hi All,
    Can anybody from the Content DB product development answer this question?
    Regards
    Harvey

  • How to configure  a test sever with the system copy with prd data

    Dear All ,
    I need to configure  a test sever with the system copy with prd data.
    Please any one can suggest the step by step process to do the same configure and  system copy.
    Regards
    kumar

    Dear All,
    I am facing problem in system copy. I want to knoe the way after restore i  can move all the data and server data in one drive .
    Now the error is resolve by changing the initTAT.sap the value tape to disk but now stuck in the drive for restore it is asking which is not there at os level.
    BR0252E Function mkdir() failed for 'M:\oracle\TST\SAPDATA4\PRD33' at location
    BrDirCreate-1
    BR0253E errno 2: No such file or directory
    BR0252E Function mkdir() failed for 'M:\oracle\TST\SAPDATA4\PRD32' at location
    TO solve the above problem i have created ad network drive for this but once all the restore will be completed than how i can i move the data form network drive to on drvie.
    Please suggest
    Regards,
    Kumar
    Edited by: kumarmoh on Jul 21, 2009 1:43 PM

  • How to synchronize test schema objects with the prod schema objects.

    Hi,
    I have a requirement of synchronizing test schema objects with the production schema objects. Please let me know the below
    1. if there is a standardized method for such activity,
    2. if there are oracle utilities for this task.
    3. If i had to do this job manually, can you let me know the check list if any.
    Thanks
    Purushotham M

    http://www.oracle.com/technetwork/issue-archive/2012/12-sep/o52sqldev-1735911.html
    You could try database diff tool in sql developer(but there are some licence restrictions).
    I don't know your database version, you could try DBMS_COMPARISON package also.
    Look at this link http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_comparison.htm
    Other solution is to create db link between test and production database, and then you can try different types of queries like
    select table_name from user_tables
    minus
    select table_name from user_tables@db_link_to_other_database
    And you can do this for columns, indexes and so on.
    But you must have proper DDL scripts for this, to generate sync script.
    Also there is a question about work process, you are doing sync in reverse order(from production to test). Test db is for test, after test you go to production db with proper ddl and dml scripts, so these schemas shouldn't be different in the first place(talking about schema, not data here).

  • How to upload a current file to the remote server in Dreamweaver?

    I am trying to transfer an html file from FrontPage to the server via Dreamweaver, but it absolutely refuses to upload. Help!

    Nobody can know anything. You are not providing any system information, what version of DW you use, what the remote server actually is. and since this is a DW question, ask in their forum with the proper information included.
    Mylenium

  • HT1555 I've lost my Apple Remote. How can I connect my ipad with the remote app, as I can't obviously unpair the lost remote!?

    I lost my remote so downloaded the remote app onto my ipad, but unfortunately doesn't connect automatically. It says I have to disconnect the remote by accessing the Apple TV by the remote which I have lost.  HELP.

    to pair a remote app require a working remote
    or a device with a bound remote app
    if you don't have that you can borrow or buy a new remote

  • How to put two files with the same name into the same folder?

    How can I put two files with the same name and the same extention into the same directory?
    Is this even possible?
    Thanks in advance. 

    Are you sure? I would be very surprised if that was the case.
    How does the computer/filing system differentiate the files, if not by their names?
    How do you tell the computer which one you want? (On the command line.)

  • How to check-in multiple files with same name having different revision num

    Hi
    Can anyone please tell me, how to check-in multiple files with the same name with different revision number using RIDC API.
    For eg:
    First I will check-in a file(TestFile.txt) into a content server with revision number 1 using RIDC API in ADF application. Then after some time, will modify the same file(TestFile.txt) and check-in again. I tried to check-in same file multiple times, however first time its checking-in correctly into server showing revision as 1, while checking-in same file again, its not giving any errror message, and also its not reflecting in server. Only one file(TestFile.txt) is reflecting in server.
    How to implement this functinality using RIDC API? Any suggestions would be helpful.
    Regards
    Raj
    Edited by: 887680 on Mar 6, 2013 10:48 AM

    Hi Srinath
    Thanks for your response. Its not cloning, its like check-in file first, then check-out the file and do some editing and then again upload the same file with different revision number using RIDC. I got the solution now.
    Regards
    Raj

  • How to auto insert a number array with size of 20 into a named excel file with the positon is from A1 TO A20?i use lv6.1

    can you give me a example vi for it ?thanks a lot!
    how to auto insert a number array with size of 20 into a named excel file  with the positon is from A1 TO A20?i use lv6.1

    You don't need us to give you an example, as the example already comes with LV. Go to Help>>Find Examples and search for "excel". You will find an example called "write table to XL". You should note that the example doesn't do that exactly, because it writes a 2D array from 2 to N.
    You can modify the example by using only one for loop (instead of nested loops) with a 1D array or by going into the Set Cell Value and modifying it to accept a second cell value for the Cell2 terminal and wiring in a 1D array instead of the single string. If you do modify it, be sure to save it under a different name, so you don't overwrite the original.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the rows? Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    Hello Anybody, I have a question. Can any of you please suggest me how to make an xml file from the database table with all the records?
    Note:- I am having the XSD Schema file and the resulted XML file should be in that XSD format only.

    The Oracle documentation has a good overview of the options available
    Generating XML Data from the Database
    Without knowing your version, I just picked 11.2, so you made need to look for that chapter in the documentation for your version to find applicable information.
    You can also find some information in XML DB FAQ

  • There is no 'Save as' under the file menu.  How do I save a file with another name?

    Numbers help refers to the 'Save As' function in the File menu.  My version (latest) does not have a 'Save As' function.  How do I save a file with another name?

    Ross Millard wrote:
    Badunit. You have an original file and an edited file. Now you duplicate the edited file and save it with a different name. Now do you have to go and delete the changed file from which the duplicate had been made? And.... is the original still unchaned... still original?
    Ross,
    For the situation you describe, Apple has provided Duplicate and Revert. Use File > Duplicate to reach this menu:
    Regards,
    Jerry

Maybe you are looking for

  • How do I drag and drop files between computers when using Home Sharing in ITunes?

    How can I drag music files between computers while using Home Sharing? An older version of ITunes had a Home Sharing icon in the column browser near the playlist so it was easy to drag and drop.

  • How to block calls based ANI for individual user?

    I want to know how to block calls based on ANI for individual user in CUCM?  Lets say if the individual wants to block calls from certain number. Malicious call id - softkey will not work for our purpose. calls come to cucm via mgcp gateway.  cucm 9.

  • Premiere elements 12 on Mackbook Pro running Maverick

    Premiere elements 12 on macbook pro running maverick. Crashes on opening with multi page error message.  reinstall does not help

  • Wired port not conencting

    I have a poor wired connection running to my bedroom - only 4 wires available instead of the 8 wire Cat-5. I have had an old Airport connected (original model) and it worked fine. I tried to upgrade to the new Airport Extreme and the internet connect

  • CMC Schedules

    Hi, We're just looking into using the CMC scheduler to execute BODI jobs.  However it appears that CMC doesn't detect job failures on the DI side.  Is that really true?  If so I'm not sure if we can really use CMC as detection of job failure is a pre