CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2008
    Posts
    7

    Linking to another file.

    Ok,

    lets say there is a client program X.exe that uses the files y.dat and z.dat as a source of information. (extensions are made up). Now lets say I want to switch y.dat with a modified version of y.dat. The y.dat file however, is very large, and copying to create the switch would take forever. Is there anyway I could code a program to create a file y.dat, that would link to either the original or modified depending on what the user wants? In other words, to change the path without having to move the large files. Note, I don't have access to the source of x.exe. Thanks very much.

    -waffles

  2. #2
    Join Date
    Oct 2006
    Location
    Sweden
    Posts
    3,654

    Re: Linking to another file.

    I can't say I 100% understand what you're trying to accomplish...
    However, to create a path that can be redirected to different versions of y.dat use subst
    (Type help subst in a shell window)
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    http://www.codeguru.com/forum/announ...nouncementid=6
    and http://www.codeguru.com/forum/showthread.php?t=366302 before posting

    Refresh your memory on formatting tags here
    http://www.codeguru.com/forum/misc.php?do=bbcode

    Get your free MS compiler here
    https://visualstudio.microsoft.com/vs

  3. #3
    Join Date
    Aug 2008
    Posts
    7

    Re: Linking to another file.

    Well basically. X.exe accesses y.dat. It's behavior is based on y.dat. If I modify y.dat, x.exe behaves differently. I have two versions of y.dat. y.dat is very large. How can I easily determine which y.dat x.exe accesses without having to move a large amount of data. In other words, could I create my own y.dat, which x.exe accesses, that would in turn load the y.dat in a different folder that I want.

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

Featured