in reply to Append new files only.

c4jjm:

Are you aware that you can use tar? It already has the ability to only append newer files to the archive. It won't be the same file format, but it might be able to help you out.

Anyway, for your coding problem, it looks like you just need to chomp your lines as you read them, otherwise the end-of-line at the end of the filename will cause you a mismatch: After all "foo" doesn't equal "foo\n", which is what it looks like your program is doing.

...roboticus

When your only tool is a hammer, all problems look like your thumb.

Replies are listed 'Best First'.
Re^2: Append new files only.
by c4jjm (Initiate) on Nov 10, 2011 at 00:56 UTC

    THANK YOU ROBOTICUS!

    It's always the little stuff that makes all the difference...Everything works great now with chomp.

    Also, I'm curious, I have not used tar and the only tar I am familiar with is a Linux object, so my guess is that it only works in Linux? (This particular script needs to run in Windows.)

      c4jjm:

      While it's a *nix program, there are versions for Windows too. I just mentioned it because I was most familiar with it. There are other programs that will do the same thing. I'd imagine that since WinZIP can read tar files, that it probably has the ability to just add new/modified files to the ZIP file without reprocessing the entire thing. (Just guessing, no real knowledge of it.)

      ...roboticus

      When your only tool is a hammer, all problems look like your thumb.