Article ID: 3261, created on Nov 30, 2007, last review on May 10, 2014

  • Applies to:
  • H-Sphere


User log files are stored for 7 days and then automatically removed. If you want to remove old log files manually, follow the instructions below:

1. Go to the HSphere\scripts\ directory. In the file find the directory where WWW and FTP logs are stored.

// path to directory where websites logs are located
logWebPath = "d:\\HSlogfiles\\www"

// path to directory where ftpsites logs are located
logFtpPath = "d:\\HSlogfiles\\ftp"

2. Go to the respective directory (cd d:\hslogfiles\www)
Here you will find directories containing web log files for each domain
e.g.: W3SVC1, W3SVC2, W3SVC3 and so on.
directories containing ftp log files for each domain
e.g.: MSFTP1, MSFTP2, MSFTP3 and so on.

3. Enter "del /s /q <mask>" command in the command line where <mask> is the mask for the files to be removed.
* You can use a wildcard in the mask.

Names of the log files have the following appearance:

exyymmddhh.log or just exyymmddhh


ex - the essential part of the name
yy - two-digit year value
mm - two-digit month value
dd - two-digit day value
hh - two-digit hour value

Examples of how to use the del command:

del /s /q ex01* - removes all files for the year 2001
del /s /q ex0102* - removes all files for February, 2001
del /s /q ex??02* - removes all files for February of all the years

? - Any single character
* - Zero or more characters

f213b9fa8759d57bee5d547445806fe7 6311ae17c1ee52b36e68aaf4ad066387

Email subscription for changes to this article
Save as PDF