Results 1 to 3 of 3

Thread: Is there a shortcut to directory comparisons?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Location
    Tennessee
    Posts
    130

    Is there a shortcut to directory comparisons?

    I'm developing a relatively quick-and-dirty approach to copying some files over. The situation is that I have a point on the network where a master directory is located. This directory includes the official directory structure as well as all official files. The user's local machine should have a place in their C:\Program Files directory that has the exact same directory structure. If it doesn't, the application should create it and copy files over based on the network master. If the user's local machine does have the appropriate folders in place, then any newer files found in the network master directory should be copied over to update the user's local files.

    It seems to me that this would require knowledge of the root directories up to the point of the network master and the same for the local directory. At first glance, this looks to be a bit more complicated to accomplish than I was thinking it should be.

    Are there any shortcuts to using say the Directory/DirectoryInfo, File/FileInfo classes, etc that would allow this to be accomplished? I'm trying not to overcomplicate it as I need to get something out pretty quick. But the answer just doesn't seem to be showing itself.

    Thank you in advance!

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Is there a shortcut to directory comparisons?

    Why cant you just copy the entire root folder across? That would copy all of the subfolders and files as well.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Location
    Tennessee
    Posts
    130

    Re: Is there a shortcut to directory comparisons?

    As time goes by, the number of files could increase. I didn't want a process to take longer than it should have to. So if two files are required to be updated, then only those two, not the next 30-40 files.

Tags for this Thread

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