AutoSoft Systems
        AutoSoft Systems 2 Round Hill Court
        East Greenwich, RI 02818
        401.884.5653 Fax
                        401.996.3631 Cell
AMDG       Decision Ready Information! autosoft@aol.com
Commercial & custom multi-user computer software for a variety of applications including performance metrics, statistical analysis, data extraction and merger from multiple large databases, computer simulation and management information systems.  Founded in 1982.
We know Excel! Whenever possible, Excel is the user interface, VBA is the programming language, ODBC connects to the database of your choice.
Home About Us Literature Wire & Cable Pharmaceutical & Biotech Construction Management Commercial Products Custom Solutions
Contact Us Events Downloads
CART Report Archiving (End of Day)
Data is always changing.  Some data is stored in AXIOM forever.  Other data changes with time. An AXIOM report that you ran 3 months ago may not by available today.  The EndOfDay.xls utility takes a snapshot of the CART\Instant\ folder every day at 11:55 PM (or whenever you want the Windows Scheduled Tasks to launch it) and sets it aside as a permanent archive.
The macro code is quite simple and is listed here in its entirety:
Sub EndOfDay()
    Dim FolderY, FolderM, FolderD, FolderI As String
    Dim fs As Object
    FolderY = "S:\AxiomReporting\CART\Archive\" + CStr(Year(Date))
    FolderM = FolderY + "\" + Right("0" + CStr(Month(Date)), 2)
    FolderD = FolderM + "\" + Right("0" + CStr(Day(Date)), 2)
    FolderI = FolderD + "\Instant"
    Set fs = CreateObject("Scripting.FileSystemObject")
    If fs.FolderExists(FolderY) = False Then fs.CreateFolder (FolderY)
    If fs.FolderExists(FolderM) = False Then fs.CreateFolder (FolderM)
    If fs.FolderExists(FolderD) = False Then fs.CreateFolder (FolderD)
    If fs.FolderExists(FolderI) = False Then fs.CreateFolder (FolderI)
    Application.DisplayAlerts = False
    fs.copyfile "S:\AxiomReporting\CART\Instant\*.*", FolderI
    Application.DisplayAlerts = True
End Sub
Be careful however!
These files add up with time.  A typical CART\Instant folder could contain 0.5 GB of data, requiring 180 GBs of storage space for a year's worth of archives.  Plan ahead and use the SMART WatchDog utility to monitor remaining hard drive space.  The ArchivePruner.xls utility will prune the Archive of redundant files.
  Click here for a copy of this utility.                      
AutoSoft Systems | 2 Round Hill Court, East Greenwich, Rhode Island, USA 02818 | 401.885.3631 | Fax: 401.884.5653 | Mobile: 401.996.3631 
This web page was last updated at 02/21/2014 07:41 AM and is written in EXCEL!
AXIOM is a Trademark of Consona - USYS is a Trademark of Zumbach - AutoSoft Systems is not affiliated with Consona nor Zumbach