====== Add Files ====== New for Synchronet v3.19, this JavaScript utility script replaces the functionality of the old [[util:ADDFILES]] program. This script can import files into one or more filebases either using input filename/description lists (e.g. ''FILES.BBS'') or by just searching for files in the directory's storage path and using any descriptions embedded in each file's archive (e.g. ''FILE_ID.DIZ''). If you just want to add a single file from the command-line, then you'll probably want to use ''[[postfile]].js'' instead. ===== Invoke ====== Run with [[util:JSexec]] jsexec addfiles -help usage: [-options] [dir-code] [listfile] [desc-off] options: -all add files in all libraries/directories (implies -auto) -lib= add files in all directories of specified library (implies -auto) -auto add files only to directories that have Auto-ADDFILES enabled -from= specify uploader's user name (may require quotes) -file= specify files to add (wildcards supported, default: *) -ex= add to excluded filename list (default: FILES.BBS,FILE_ID.DIZ,DESCRIPT.ION,SFFILES.BBS) -diz always extract/use description in archive -update update existing file entries (default is to skip them) -date[=fmt] include today's date in description -fdate[=fmt] include file's date in description -adate[=fmt] include newest archived file date in description (fmt = optional strftime date/time format string) -delete delete list after import -v increase verbosity of output -debug enable debug output optional: dir-code: File directory internal code listfile: Name of listfile (e.g. FILES.BBS) desc-off: Description character offset (number) If no options or directories are specified, the sysop will be prompted for a directory to add files to. ==== Examples ==== * To search for files and import them in all directories: jsexec addfiles -all * To search for a ''FILES.BBS'' list file and import them in all directories: jsexec addfiles -all FILES.BBS * To search for a ''FILES.BBS'' list file and import them in all directories of the "main" library: jsexec addfiles -lib=main FILES.BBS * To add files/descriptions from a ''FILES.BBS'' list (where file descriptions begin at column 40) for the //graphics// directory: jsexec addfiles graphics FILES.BBS 40 ===== See Also ===== * [[:module:|module index]] {{tag>jsutil files}}