0

From time to time I will archive some fairly large files (20-100MB) using WinRAR, but before I do that, I always run a command (or set of commands) on each file to process them in whatever way I need to. However, I want to keep the original files untouched. So what I'm wondering is, if there is some way to modify the files on-the-fly, without having to make copies of the files first, since that adds bit of time to the process...

6
  • How much RAM do you have available on the machine? If you have plenty, you might utilize a RAM disk as target for your processed files. imdisk is a free unrestricted RAM disk, and also has a commandline interface with which you can create a RAM disk on demand and also unmount/delete it again. (I use imdisk with Windows 7 x64. It also supports XP, but i have not used it there.)
    – user274116
    Nov 15, 2013 at 11:57
  • @elgonzo hey. I have 3,25GB RAM. Well, technically 4GB, but I'm limited by the 32-bit architecture. Can you explain the purpose of using a RAM disk? Is is supposed to speed up copying the files? I tried ImDisk, and I can't say it's any faster... maybe I'm doing something wrong.
    – user966939
    Nov 15, 2013 at 13:23
  • It sounds like you pack each processed and updated file individually into the RAR archive, right? If so, you can first process all files and store them onto the RAM disk (you can create a small RAM disk of, say, 500MB and delete it after you are finished) and then pack them all together at once into the RAR. If you already process all files first and then pack them at once, your performance bottle neck is probably the RAR archiver, and not your file I/O.
    – user274116
    Nov 16, 2013 at 0:08
  • @elgonzo No. I process all the files and then I add all the files to an archive in one go. But I think you are forgetting (or missing?) one part: I need to keep the original files as they are, so I can't just process the original files directly. And it seems like the only way things could be sped up is if the files were already on the RAM disk and if I then made copies from the RAM disk back to the RAM disk. The transfer from the drive itself to the virtual RAM disk still becomes a bottle-neck. Unless I'm missing something.. ?
    – user966939
    Nov 16, 2013 at 0:29
  • If you just use one physical mechanical HDD (not a SSD), a RAM disk could provide a performance benefit, as the HDD would only need to read data in a somewhat sequential order. This can lead to a performance gain since the HDD doesn't need to move its head assembly so often. However, this would not apply if you use a SSD or multiple HDDs. But even then, a RAM disk would not slow down the process. A RAM disk is orders of magnitude faster than a HDD and still somewhat faster than a SSD (although not much). (continued in next comment...)
    – user274116
    Nov 16, 2013 at 1:58

1 Answer 1

0

From time to time I will archive some fairly large files (20-100MB) using WinRAR, but before I do that, I always run a command (or set of commands) on each file to process them in whatever way I need to. However, I want to keep the original files untouched. So what I'm wondering is, if there is some way to modify the files on-the-fly, without having to make copies of the files first, since that adds bit of time to the process...

The archiving step is irrelevant, the fact is that there is no way to have a modified copy without making a copy.

If you want to modify a file but keep the original, then you must make a copy. Even if you open the original file, make some changes, then use Save As to save to a new filename, you are still making a copy of all of the parts of the file that have not been modified.

There’s just no logical way to keep the original and have a modified copy without making a copy.


This sounds like it could be an XP problem, like instead of trying to figure out how to make a copy without making a copy, instead, focus on what the underlying goal is, such as diff’ing the files and/or using an RCS.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .