Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. copy file with c# win forms

copy file with c# win forms

Scheduled Pinned Locked Moved C#
csharpsysadmin
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    F Offline
    fady_sayegh
    wrote on last edited by
    #1

    hi to all, i am working with c# win application. i want to copy a file from a server on the local machine. the path to my file is "http://server/Dir1/myfile.doc". before doing the copy, i need to verify if the file on the server has recent date than the file on the local machine. if yes i want to make the copy and if not i do nothing any suggestions or code sample best regards and thanks in advance fady

    J 1 Reply Last reply
    0
    • F fady_sayegh

      hi to all, i am working with c# win application. i want to copy a file from a server on the local machine. the path to my file is "http://server/Dir1/myfile.doc". before doing the copy, i need to verify if the file on the server has recent date than the file on the local machine. if yes i want to make the copy and if not i do nothing any suggestions or code sample best regards and thanks in advance fady

      J Offline
      J Offline
      James Gupta
      wrote on last edited by
      #2

      If you convert each segment of the date into a string, and check each segment in order, so: if (server.year > local.year) if (server.month > local.month) if (server.day > local.day) etc - I am not sure on the datetime conversion functions, but there will be a way to split it up into segments with normal string functions and then convert them to int32's Regards James

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups