Computing: Free Pascal Programming

Programming Home   Home   Contact

Website downloads count (dwnldcount).

Description: Very simple command line program, that may be used to count the downloads from a website. Counting is done for a given file type (given file extension) downloaded from a given directory on the webserver (URL). What exactly has to be counted is described in a configuration file (dwnldcount.ini).
The input to the program are statistics text files, one for each month, containing a list of the number of downloads of the (normally all) files for the corr. month. These files may easily be created manually by simply copying/pasting the list content, generated by website statistics applications as awstats into a text file.
The output of the program is a text file with a table, showing the counts for the different downloads considered per month. The first row shows the download of different files, i.e. how many of the considered files actually present in the considered directory have been downloaed during a given month; e.g. 139 Free Pascal sources of the 144 available. The second one shows the total monthly file download, i.e. how may times the considered files in the considered directory have been downloaded during a given month (resp. last column: during the year considered); e.g. 533 times that a Free Pascal source has been downloaded.
For help with this program, have a look at the ReadMe.txt file, included within the program download archive.

Change log:
Version 1.0 (September 2020): Original program
Version 1.1 (December 2020):
    - Number of files considered for counting set to number of server files minus files to be excluded
      (thus files_server may be set to total number of files for considered extension).
Version 1.2 (January 2021):
    - Asking for the year, for which the counts have to be done (instead of assumingg the current year).
    - For the current year, including the current month (instead of doing only until the preceding one).

Free Pascal features: Reading and writing text files (classic Pascal). Reading Free Pascal INI files.


Download statistics (program output file viewed in Notepad++)