View Single Post
  #15  
Old 01-25-2013, 02:56 PM
mrburns mrburns is offline
Approved Member
 
Join Date: Mar 2008
Posts: 22
Default

I'll look into your suggestion, but this code works perfectly. Maybe its because I'm running an I7 processor, but it works fast and doesn't impact my game while its running. The runwait is used to be sure the process is finished before continuing.

You call this routine when you want the files randomized. The files that have been played can't be removed.
This procedure randomizes the source files, removes the files from the destination (except those that are locked) to avoid a buildup of unneeded files, then copies the files from the source to the destination, prepending a 3 digit number that is less than the one used the last time this procedure was called.

Since you can't do anything with the locked files until IL2 exits, its necessary to have a source that isn't locked. Otherwise you can't rename them. Hence the source folder which should never have its files removed as they are the master files.

Last edited by mrburns; 01-25-2013 at 03:09 PM.
Reply With Quote