Results 1 to 7 of 7

Thread: I need your help...

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2004
    Posts
    33

    I need your help...

    Here my sceanario:

    I have a file in my server
    Then a user using his desktop to compare the file in his own desktop with the one in the server.
    If it is not the newest one according to the date for the file in his desktop compare to the server one, I want to be able to overwrite the file in his desktop by downloading the newer file from the server.
    How can I do that?
    Thanks
    Last edited by snowei1; Mar 12th, 2004 at 03:16 AM.

  2. #2
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Drop this one into your project...

    Usage:
    VB Code:
    1. Sub Form_Load()
    2.     Dim intTemp As Integer
    3.    
    4.     intTemp = CompareFiles("C:\windows\explorer.exe", _
    5.     "C:\windows\notepad.exe")
    6.    
    7.     MsgBox "The newest file is file number: " & intTemp
    8. End Sub
    Attached Files Attached Files

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  3. #3
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    That's the lastbit - checking of the files, this will copy the file:
    VB Code:
    1. FileCopy "\\server\file.ext", "C:\file.ext"

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  4. #4
    Frenzied Member usamaalam's Avatar
    Join Date
    Nov 2002
    Location
    Karachi
    Posts
    1,308
    And for downloading file, just search the forum.

  5. #5

    Thread Starter
    Member
    Join Date
    Mar 2004
    Posts
    33
    My server file need a URL like "http://servername/file.txt" to get it out. How to know whether the file in the server is the newest or not.
    And when I put the CompareFiles function directly copy in to my program it say no such function.What to do?
    Last edited by snowei1; Mar 12th, 2004 at 08:05 PM.

  6. #6
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    In vb, right click on the "project explorer" window on the right of the screen (if you can't see this window - which lists all of the forms & modules within your project, then access this via the view menu) & choose the Add > Add file options.

    Pick up the module contained in the above zip file to add this into your project...

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

  7. #7
    Addicted Member
    Join Date
    Nov 2003
    Location
    India
    Posts
    227
    There is no need of a VB program. Instead use Briefase.
    See you,
    -Jai
    [Friends Never Say Good Bye]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width