Ok, here's the setup. I have a directory C:\MyDatabases\.
Within that directory are multiple databases.
At system startup, each database is copied and has a Version Stamp (DateTime) appended to it ie: DatabaseName_Ver0701010501.mdb.
C:\MyDatabases\ dir
DatabaseName001.mdb
DatabaseName001_Ver0627010501.mdb
DatabaseName001_Ver0628010501.mdb
DatabaseName001_Ver0629010501.mdb
DatabaseName002.mdb
DatabaseName002_Ver0627010501.mdb
DatabaseName002_Ver0628010501.mdb
DatabaseName003.mdb
DatabaseName003_Ver0627010501.md
I guess you get the idea.
I will always want to copy the master database, but I would like to keep a maximum of three(3) copies. So here's what I
want to do. I want to scan the directory for the number of version copies for each master DB and if the max count is reached I would delete the oldest copy based on the Version Stamp.
Thanks in advance.
Sorry for being so verbose.
RGB
Within that directory are multiple databases.
At system startup, each database is copied and has a Version Stamp (DateTime) appended to it ie: DatabaseName_Ver0701010501.mdb.
C:\MyDatabases\ dir
DatabaseName001.mdb
DatabaseName001_Ver0627010501.mdb
DatabaseName001_Ver0628010501.mdb
DatabaseName001_Ver0629010501.mdb
DatabaseName002.mdb
DatabaseName002_Ver0627010501.mdb
DatabaseName002_Ver0628010501.mdb
DatabaseName003.mdb
DatabaseName003_Ver0627010501.md
I guess you get the idea.
I will always want to copy the master database, but I would like to keep a maximum of three(3) copies. So here's what I
want to do. I want to scan the directory for the number of version copies for each master DB and if the max count is reached I would delete the oldest copy based on the Version Stamp.
Thanks in advance.
Sorry for being so verbose.
RGB