====== ADDFILES ====== The Synchronet ADDFILES utility is an external native command-line program (written in C) that may be used to add files to the Synchronet file transfer database, usually in an automated or bulk fashion. :!: As of Synchronet v3.19, this utility has been deprecated in favor of the new ''[[module:addfiles]].js'' utility script. ===== Usage ===== There are 3 ways to use the ADDFILES utility. In all cases, the first argument must be either a configured directory's internal code (with prefix, if applicable) or the dash (''-'') character, to specify all directories (or all directories in a specific library) that have the ''Search for Auto-Addfiles'' toggle option set to ''Yes'' in [[util:SCFG]]. ==== Importing File Lists ==== To add or update filenames and descriptions from a list file (e.g. ''files.bbs''): addfiles code [-options] +listfile [desc_off] [size_off] ''desc_off'' If a filelist is specified on the command line, a description offset can be specified as the next argument. If used, this parameter will specify at what column to start importing the descriptions. For PCBoard DIR file format, you should specify a description offset of 33. Example: addfiles GAMES +DIR10 33 This offset is also used for the importing of any extended description lines. ''size_off'' If a filelist is specified on the command line with a description offset, a file size offset can be specified too. If a file size offset is specified, the disk does not need to be searched for the size of the file to determine the credit value. This is useful for adding lists of files from a CD-ROM drive as it speeds up process since the CD does not need to be scanned for the file size. This parameter is also useful for importing off-line file lists, where the file doesn't actually exist on the drive. For PCBoard DIR file format, this offset should be set to 13. Example: addfiles GAMES +DIR10 33 13 ==== Adding a Single File ==== To add or update a single file to a database with a description: addfiles code [-options] filename "description" ==== Searching for Files on Disk ==== To add any files found in the storage directory for one or more directories, use the ''-s'' option. To add only //new// files (not already in the database), use the ''-n'' option. To import embedded file descriptions (e.g. ''FILE_ID.DIZ'') if found, use the ''-z'' option. All together: addfiles code -szn ==== Options ==== -a import ASCII only (no extended ASCII) -b synchronize database with file list (use with caution) -c do not remove extra spaces from file description -d delete list after import -e do not import extended descriptions -f include file date in descriptions -t include today's date in descriptions -i include added files in upload statistics -n do not update information for existing files -o update upload date only for existing files -u do not update upload date for existing files -z check for and import FILE_ID.DIZ and DESC.SDI -k keep original short description (not DIZ) -s search directory for files (no file list) -l specify library (short name) to limit scope of Auto-ADD -x specify uploader's user name (may require quotes) ==== Auto-ADD ==== * use ''-'' in place of code for Auto-ADD of ''files.bbs'' * use ''-filename'' to Auto-ADD a different filename * use ''-l "libname"'' to only Auto-ADD files to a specific library ==== Examples ==== Importing FILES.BBS format: addfiles games +c:\lists\files.bbs Importing DIRxx format: addfiles games +c:\lists\dir01 33 Importing any offline files from all //Auto-ADD// enabled directories: addfiles - -sn ===== See Also ===== * [[util:index|Utilities]]