Synchronet v3.18b-Win32 (install) has been released (Sept-2020).

Synchronet v3.19a, now under development, requires libarchive-dev to build successfully.

You can donate to the Synchronet project using PayPal.

Table of Contents

Delete Files

New for Synchronet v3.19, this JavaScript utility script replaces the functionality of the old DELFILES program.

It can be used to:

  • Delete files that were uploaded/imported more than n days ago (max age configured in SCFG)
  • Delete files that have not been downloaded in more than n days (purge by last download date configured in SCFG)
  • Delete the oldest files that cause the number of files in the directory to exceed the configured maximum (configured in SCFG)
  • Remove files that are not physically present on the disk (so-called “offline” files)

Invoke

Run with JSexec

jsexec delfiles -help
usage: [-options] [[dir_code] [...]]
options:
  -lib=<name>     search for duplicates in specified library only
  -ex=<filename>  add to excluded file name list (case-insensitive)
  -offline        remove files that are offline (don't exist on disk)
  -test           don't actually remove files, just report findings

If no options or directories are specified, all directories will be scanned for files that should be removed/deleted based on the sysop's configuration of the directories (i.e. maximum file age and maximum number of files to retain).

Examples

* To search all directories for files to be removed based on age or excess number of files:

jsexec delfiles

* To search only directories in the “Main” library for offline files to be removed:

jsexec delfiles -offline -lib=Main

* To report files that *would* be removed/deleted from the “games” directory, without actually removing or deleting them:

jsexec delfiles -test games

See Also


In Other Languages
Translations of this page: