home *** CD-ROM | disk | FTP | other *** search
/ PC Open 7 / pcopen7.iso / MSDOS / Fill702 / FILL.DOC < prev    next >
Encoding:
Text File  |  1997-02-28  |  21.3 KB  |  451 lines

  1. FILL.DOC                            1                         Revised: 02-28-97
  2.  
  3. The FILL program is designed to help you move or copy files  off  a  hard  disk
  4. while reducing the amount of wasted space on the destination disks. Internally,
  5. it does this by sorting the file names so the largest  files  are  moved/copied
  6. first.  It then moves or copies whatever files can fit on the floppy,  skipping
  7. any that can't.  Features:
  8.  
  9.   * Can either move or copy the files to the resulting location.
  10.   * Defaults to moving files if parameters passed in; prompts otherwise.
  11.   * Can continue to multiple diskettes as desired, beeping if desired when  the
  12.     next disk is expected.
  13.   * Can move the files in file name order or  in  any  of  the  other  standard
  14.     ordering sequences.
  15.   * Can be used to split up files which are too big to fit on a single disk.
  16.   * Works fine for network transfers where standard MOVE command doesn't always
  17.     work.
  18.   * Works fine on Iomega ZIP drives and other  DOS-level  compatible  removable
  19.     media.
  20.   * Can create a status/transaction file, showing what was copied/moved.
  21.   * Can label the output diskette, providing some patterns like  disk  sequence
  22.     numbers and dates which it will fill in for you.
  23.   * Can review and delete if desired any files which are already in the  output
  24.     destination (for example, already on the output diskette).
  25.   * Can reformat the whole disk if files are going to drive A or B.
  26.   * Can specify an input file ("@listfile") which  contains  the  files  to  be
  27.     copied.
  28.   * Pressing escape stops the program early.
  29.  
  30. Limits:
  31.   * Routine can only process the first 500 files found.  It ignores the rest of
  32.     them.  If you're using /MOVE, you can always run it after some of the files
  33.     are gone and get the rest of them that way.
  34.   * Routine can only review for deletion the first  200  files  in  the  output
  35.     location.
  36.   * Routine does not provide any cool features to  fix  up  destination  drives
  37.     that have surface errors.  If it encounters an error, it just beeps,  gives
  38.     you an error message, and returns to DOS.
  39.   * Routine will not format the output diskette for you.
  40.   * Switching diskette densities is not recommended (for  example,  intermixing
  41.     720K diskettes with 1.44MB diskettes may cause errors).
  42.  
  43.  
  44.  
  45. FILL.DOC                            2                         Revised: 02-28-97
  46.  
  47. Note on copying/moving files to multiple diskettes:
  48.  
  49. I didn't think this was confusing but a lot of people don't seem to  understand
  50. the technique of how files are moved to multiple diskettes.
  51.  
  52. Let's say you have six files:
  53.  
  54.         A_FILE.ZIP      500K
  55.         B_FILE.ZIP      300K
  56.         C_FILE.ZIP      650K
  57.         D_FILE.ZIP      200K
  58.         E_FILE.ZIP      450K
  59.         F_FILE.ZIP       25K
  60.  
  61. You're moving these files to blank 1.2MB diskettes and  you  have  the  default
  62. /MULTI and /ON settings.  The program checks how much space is available on the
  63. destination drive and comes back with 1.2MB.
  64.  
  65. It scans the input files and internally sorts them by descending size.  It then
  66. looks for the biggest file in the file list and comes back with  C_FILE.ZIP  at
  67. 650K.  Will this file fit on the destination  drive?   Yes.   It  retains  that
  68. information, figures there is now 550K left on the output drive, and checks for
  69. the second biggest file.  A_FILE.ZIP is 500K.  Will that also  fit?   Yes.   So
  70. now there's 50K left.  The next biggest file is E_FILE.ZIP at 450K.  Will  that
  71. fit?  Nope.  Check the next biggest.  This continues until it reaches the  file
  72. F_FILE.ZIP which is only 25K.  That's the biggest file that  will  fit  in  the
  73. remaining 50K.
  74.  
  75. So it has three files to move.  What order should it move them?  You  have  /ON
  76. set so it's going to move them in file name order.  So it moves  the  following
  77. files in the following order:
  78.  
  79.         A_FILE.ZIP      500K
  80.         C_FILE.ZIP      650K
  81.         F_FILE.ZIP       25K
  82.  
  83. Next diskette.  Same process.  This time it processes the remaining files:
  84.  
  85.         B_FILE.ZIP      300K
  86.         D_FILE.ZIP      200K
  87.         E_FILE.ZIP      450K
  88.  
  89.  
  90. Specifying parameters:
  91.  
  92. Parameters for this program can be set in the following ways.  The last setting
  93. encountered always wins:
  94.   - Read from an *.INI file (see BRUCEINI.DOC file),
  95.   - Through the use of an environmental variable (SET FILL=whatever), or
  96.   - From the command line (see "Syntax" below)
  97.  
  98.  
  99.  
  100. FILL.DOC                            3                         Revised: 02-28-97
  101.  
  102. Syntax:
  103.  
  104.     FILL [ filespec | @listfile ] [ pathspec | /TO pathspec ]
  105.       [ /MOVE | /COPY ] [ /PROMPT ] [ /Iinitfile | /-I ]
  106.       [ /OVERWRITE | /-OVERWRITE | /OVERSKIP | /OVERASK ]
  107.       [ /Ox | /O-x ] [ /Xfilespec ]... [ /WIPE ] [ /MULTI | /SINGLE ]
  108.       [ /SPLIT ] [ /FORCE ] [ /-LETTER ] [ /LABEL=label [ /START=n ] ]
  109.       [ /Frptfile [ /S+ | /S- | S* ] [ /CONT ] [ /TIME ] [ /ATTR=attribs ]
  110.       [ /-BEEP ] [ /-LAST ] [ /FAKE ] [ /MONO ] [ /Q ] [ /? ]
  111.  
  112. where:
  113.  
  114. "filespec" is the file specification for  what  you  want  to  move.   You  can
  115. specify a drive  and  path  and  file  wildcards  if  necessary  (for  example,
  116. "C:\TEMP\*.BAT") but otherwise it defaults to your default drive and  directory
  117. and takes "*.*".  Note that the program cannot handle any request for more than
  118. 500 files at a time.
  119.  
  120. "@listfile" allows you to have a variety of file specifications saved in a text
  121. file named "listfile".  You cannot have more than  50  file  specifications  in
  122. this file (and you're still limited to the 500 files total).  Each line  should
  123. consist of a file name with optional drive and path information.   Blank  lines
  124. and lines beginning with semi-colons, colons, or quotes are ignored.
  125.  
  126. "pathspec" (or "/TO pathspec") tells the routine what drive or path to move the
  127. files to.  The use of the "/TO" keyword is optional unless the specification is
  128. being provided in an initfile.  The initial default is "A:" (or "/TO A:"). (Use
  129. the initfile--see BRUCEINI.DOC--if you need will usually need to change it "/TO
  130. B:" or something.)
  131.  
  132. In many cases, the routine doesn't really care whether the source specification
  133. precedes  or  follows  the  destination  specification.   If  either  parameter
  134. contains a wildcard or a period, FILL presumes that's the source  specification
  135. and the other one must be the destination specification.  If only one parameter
  136. is specified, FILL  usually  presumes  that's  the  destination  specification.
  137. Quickie table:
  138.  
  139.         User passes      Presumed   Presumed
  140.                          filespec   pathspec
  141.  
  142.         FILL C:          *.*        C:
  143.         FILL C: A:       C:*.*      A:
  144.         FILL *.BAS A:    *.BAS      A:
  145.         FILL *.BAS       *.BAS      A:
  146.         FILL C: /TO A:   C:*.*      A:
  147.         FILL /TO B:      *.*        B:
  148.         FILL             *.*        A:
  149.  
  150. "/MOVE" says to move the files instead of copying them.  Initially defaults  to
  151. "/MOVE" if other parameters are passed in (for example, "FILL *.ZIP" will  move
  152. the files) and prompts otherwise.  Check out BRUCEINI.DOC  for  information  on
  153. changing the defaults otherwise.
  154.  
  155. "/COPY" says to copy the files instead of moving them.  Initially  defaults  to
  156. "/MOVE" if other parameters are passed in (for example, "FILL *.ZIP" will  move
  157. the files) and prompts otherwise.
  158.  
  159.  
  160. FILL.DOC                            4                         Revised: 02-28-97
  161.  
  162. "/PROMPT" says to  prompt  for  each  filename  before  moving  it.   Initially
  163. defaults to "/-PROMPT".
  164.  
  165. "/-PROMPT" says to not prompt for each file.  Initially defaults to "/-PROMPT".
  166.  
  167. "/Iinitfile" says to read an initialization file with the file name "initfile".
  168. The file specification *must* contain a period.  Initfiles are described in the
  169. BRUCEINI.DOC file.  Initially defaults to "/IFILL.INI".
  170.  
  171. "/-I" (or "/INULL") says to skip loading the initialization file.
  172.  
  173. "/OVERWRITE" says to  overwrite  same-named  files  in  the  destination  path.
  174. Initially defaults to "/OVERSKIP".
  175.  
  176. "/-OVERWRITE"  says  to  abort  if  any  same-named  files  are  found  in  the
  177. destination path.  Initially defaults to "/OVERSKIP".
  178.  
  179. "/OVERSKIP" says to skip any file that already exists in the destination  path.
  180. The counts aren't accurate in this case.  This is initially the default.
  181.  
  182. "/OVERASK" says  to  prompt  if  same-named  files  exist  in  the  destination
  183. directory.  Initially defaults to "/OVERSKIP".
  184.  
  185. "/Ox" and "/O-x" allow you to specify the copy order for the files.  "x" can be
  186. one of the following:
  187.  
  188.         N = file name
  189.         D = file date and time
  190.         S = file size
  191.  
  192. If you precede the "x" with a dash ("-"), the sort  will  be  done  in  reverse
  193. order.  Note that this parameter does not determine which files are copied;  it
  194. only determines what order they are actually copied.  Since the order that  the
  195. file tends to show up in a DOS DIR listing is based  on  creation  order,  this
  196. sequence may be relevant to  how  the  files  ultimately  show  up.   Initially
  197. defaults to "/ON".
  198.  
  199. "/Xfilespec" says to exclude certain  filespecs  from  being  moved.   You  can
  200. specify up to 10 exclusion parameters but each must have their  own  /Xfilespec
  201. statement.  For example, to move all files except those with a  BAS  extension,
  202. you could say "FILL /X*.BAS".
  203.  
  204.  
  205. FILL.DOC                            5                         Revised: 02-28-97
  206.  
  207. "/WIPE" says that if the destination drive has files on it, prompt the user for
  208. whether these files should be deleted or not.  Six sub-options show up in  this
  209. case:
  210.  
  211.     Do *NOT* delete the x file(s)    Don't delete anything
  212.     List file(s)                     List the files but don't delete any of
  213.                                      them.  The user will be reprompted for
  214.                                      these four options after pressing a key.
  215.     Select file(s) to delete         List the files and allow the user to
  216.                                      select any to be deleted.  Keys:
  217.                                         * Cursor keys -- move among list
  218.                                         * Space       -- select that file
  219.                                         * Ctrl-Enter  -- select all files
  220.                                         * Ctrl-bs     -- deselect all files
  221.                                         * Enter       -- process those tagged
  222.                                         * Esc         -- skip processing
  223.                                      After pressing Enter, the selected files
  224.                                      will be deleted.  You will then get the
  225.                                      standard four prompts again.
  226.     Delete all file(s)               Delete all files in the specified
  227.                                      directory.  Subdirectory files will not
  228.                                      be deleted.
  229.     Reformat the diskette            If your output drive is either A or B,
  230.                                      the program will shell to DOS and execute
  231.                                      a "FORMAT d:" command.  This (and the
  232.                                      next) sub-option will result in the
  233.                                      subdirectories being eliminated, something
  234.                                      which the prior sub-options don't do for
  235.                                      you.
  236.     Quick-reformat the diskette      If your output drive is either A or B and
  237.                                      you're running under DOS 5.0 or higher,
  238.                                      the program will shell to DOS and execute
  239.                                      a "FORMAT d: /Q" command.
  240.  
  241. Initially defaults to "/-WIPE".
  242.  
  243. "/-WIPE" reverses /WIPE.  Initially defaults to "/-WIPE".
  244.  
  245. "/MULTI" says to go to a second disk if all of the files can't fit on the first
  246. diskette.  Initially defaults to "/MULTI".
  247.  
  248. "/SINGLE" says process only one diskette at a time and to not  prompt  for  the
  249. next diskette once the first gets filled up.  Initially defaults to "/MULTI".
  250.  
  251.  
  252. FILL.DOC                            6                         Revised: 02-28-97
  253.  
  254. "/SPLIT" says to split up large files which otherwise would not be able to  fit
  255. onto the output disk.  For example, /SPLIT is useful when you have a 1.8MB file
  256. that you're trying to copy or move to  a  1.2MB  or  1.44MB  diskette.   Unless
  257. /FORCE is specified, files are split only if an empty output diskette would not
  258. be able to support the file; FILL will not typically split up a 800KB file just
  259. because the 1.2MB output diskette only has 600KB free.   /SPLIT  must  be  used
  260. with a specific file request; not a wildcarded one.  Split files are given  the
  261. file extensions of .x01, .x02, etc (see /LETTER vs /-LETTER options  below  for
  262. explanation of the "x") until all necessary splitting is accomplished.  To  put
  263. them back together again, use the DOS  COPY  copy  with  the  /B  option.   For
  264. example:
  265.  
  266.         COPY TEST.Z01/B+TEST.Z02/B TEST.ZIP
  267.  
  268. If (and ONLY if) you use something like Norton's DIRSORT command so  the  files
  269. appear in  sequence  in  your  directory  (and  not  because  of  any  DIR  /ON
  270. specification!), you can also concatenate using wildcards:
  271.  
  272.         COPY TEST.Z0*/B TEST.ZIP          [ONLY IF PHYSICALLY IN CORRECT ORDER]
  273.  
  274. Do NOT try this unless you're sure though, okay?  Note that if you have  a  SET
  275. DIRCMD setting, the directory may look ordered when it's not.  Use DIR  /-O  to
  276. check if necessary.
  277.  
  278. "/-SPLIT" reverses "/SPLIT" and is initially the default.
  279.  
  280. "/FORCE" says to split up files when /SPLIT is used even if the file is smaller
  281. than the output disk would be.  So, if you have a 1.44MB diskette  and  a  600K
  282. file, /FORCE will allow it to be split.  This is not the  default  because  you
  283. typically do not want to split up every file; just the ones that are too big.
  284.  
  285. "/-FORCE" only allows files bigger than the output destination to be split  up.
  286. This is initially the default.
  287.  
  288. "/LETTER" says that when /SPLIT is specified,  use  the  first  letter  of  the
  289. original file extension when naming the split up file.  For  example,  TEMP.ZIP
  290. would become TEMP.Z01, TEMP.Z02, etc.  This does not affect files which do  not
  291. get split.  Initially defaults to "/LETTER".
  292.  
  293. "/-LETTER" says that split up file names  should  be  numeric  only.   TEMP.ZIP
  294. becomes TEMP.001, TEMP.002, etc.  This does not affect files which do  not  get
  295. split.  Initially defaults to "/LETTER".
  296.  
  297. "/LABEL=label" specifies the volume label to be written to the output disk.  By
  298. default, the label is not changed.   The  label  can  be  a  quoted  mixed-case
  299. string.  It can contain several replaceable lowercase only parameters:  "mm" is
  300. replaced with the two-digit month, "dd" is replaced  with  the  two-digit  day,
  301. "yy" is replaced with the two-digit year, and "n" or "nn" or "nnn" is  replaced
  302. by the sequence number of the disk.  All numeric fields are padded to the  left
  303. with zeroes as necessary.  If the current date is January 20, 1996:
  304.  
  305.         /LABEL="BKyymmdd nn"
  306.  
  307. will label the first first "BK960120 01", the second disk  "BK960120  02"  etc.
  308. Note that labels can be no longer than 11 characters in length.  All characters
  309. except the replaceable parameters will be translated to uppercase characters.
  310.  
  311.  
  312. FILL.DOC                            7                         Revised: 02-28-97
  313.  
  314. "/START=n" specifies the first sequence number to use in place of "n", "nn", or
  315. "nnn" in the /LABEL parameter.  Defaults to "/START=1".
  316.  
  317. "/Frptfile" specifies the name of a status report file  to  be  created.   This
  318. file is a text file that reports on what's been processed by the  program.   If
  319. it exists already, the file is appended to, not overwritten.  A sample of  some
  320. lines from the file using the /S* option (which is not the default):
  321.  
  322.   FILL results for  /copy *.exe /ftest.txt /beep /wipe /s* /split
  323.   Being run on 01-20-1996 at 17:58:10
  324.  
  325.   Label        FileName    Date     Time                Size Operation
  326.  
  327.   TEST93 #01   AV.EXE       09/29/95 00:50:58          70,282 SKIP
  328.   TEST93 #01   BC.EXE       08/19/94 23:59:00         150,562 SKIP
  329.   TEST93 #01   BFIND.EXE    08/02/95 23:07:08          60,016 SKIP
  330.   TEST93 #01   VBDOS.EXE    08/19/94 23:59:00         555,520 COPY
  331.  
  332.   BRUCE        AV.EXE       09/29/93 00:50:58          70,282 SKIP
  333.   BRUCE        BC.EXE       08/19/92 23:59:00         150,562 SKIP
  334.   BRUCE        BFIND.EXE    08/02/93 23:07:08          60,016 SKIP
  335.  
  336. "/S+" specifies that the only files to be written to the status file are  those
  337. files that actually get copied/moved.  This is the default.
  338.  
  339. "/S-" specifies that the only files to be written to the status file are  those
  340. files that did not get copied/moved.  Since the skipping  is  determination  is
  341. done with each disk, the status file may show the same file name as "SKIP" over
  342. and over again.
  343.  
  344. "/S*" specifies that the status report should contain all files copied/moved as
  345. well as skipped.  This can be a huge report.
  346.  
  347. "/CONT" is used if you want the routine to continually check your floppy  drive
  348. to see when a new diskette has been put in and continue once it recognizes this
  349. has happened.  The only time you'd have to press a key is if you want  to  stop
  350. processing diskettes (in which case you'd press Escape).  The determination  of
  351. a new diskette is made by seeing if the  number  of  clusters  on  the  current
  352. diskette matches the number remaining on the old one.
  353.  
  354. "/-CONT" reverses "/CONT" and is initially the default.
  355.  
  356. "/TIME" says to show how much time it took for the  transfers,  showing  you  a
  357. bytes copied/moved per second.
  358.  
  359. "/-TIME" says to skip the bytes per second information.  This is initially  the
  360. default.
  361.  
  362. "/ATTR=attribs" allows you to specify a combination of attributes that you want
  363. considered.  You can specify any combination of R (read-only),  H  (hidden),  S
  364. (system), or A (archive bit).  Precede any character(s)  with  "-"  to  exclude
  365. instead of include.  Unlike with  the  DOS  DIR  command,  the  inclusions  and
  366. exclusions are subject to "OR" conditions; /ATTR=HS will retrieve any file that
  367. is either hidden or a system file or both.   You  can  specify  "/ATTR=ALL"  to
  368. specify that all files are to be processed.  Initially defaults  to  /ATTR=-H-S
  369. (skip hidden or system files).
  370.  
  371.  
  372. FILL.DOC                            8                         Revised: 02-28-97
  373.  
  374. "/BEEP" says to beep once the routine is done doing  its  thing  (a  high  tone
  375. followed by a low one).  It will also beep whenever it's time to stick in a new
  376. diskette (a low tone followed by a high one).  Initially defaults to "/BEEP".
  377.  
  378. "/-BEEP" says to not beep upon completion.  Initially defaults to "/BEEP".
  379.  
  380. "/LAST" says to indicate when you are starting the last disk  in  a  multi-disk
  381. set.  This doesn't apply to /SPLIT cases.  Some people consider  the  indicator
  382. to be rather unappealing on the screen so it's optional.  This is initially the
  383. default.
  384.  
  385. "/-LAST" turns off the last-disk indicator in a multi-disk set.
  386.  
  387. "/FAKE" turns off the actual copying of files.   It  basically  puts  you  into
  388. simulation mode so you can see what it would do, how many disks it would  take,
  389. et cetera.
  390.  
  391. "/-FAKE" reverses "/FAKE" and is initially the default.
  392.  
  393. "/MONO" (or "/-COLOR") does not  try  to  override  screen  colors.   Initially
  394. defaults to "/COLOR".
  395.  
  396. "/COLOR" (or  "/-MONO")  allows  screen  colors  to  be  overridden.   This  is
  397. initially the default.
  398.  
  399. "/Q" turns off the file-by-file status reporting.
  400.  
  401. "/?" or "/HELP" or "HELP" shows you the syntax for the command.
  402.  
  403.  
  404. Return codes:
  405.  
  406. FILL returns the following ERRORLEVEL codes:
  407.  
  408.         0 = no problems, all files copied
  409.         1 = no problems, but some files skipped since /-MULTI
  410.       251 = couldn't find @listfile file
  411.       252 = had DOS errors copying/moving the files (bad sectors found)
  412.       253 = had problems copying/moving the files
  413.       254 = no files found to copy/move
  414.       255 = syntax problems, or /? requested
  415.  
  416.  
  417.  
  418. FILL.DOC                            9                         Revised: 02-28-97
  419.  
  420. Author:
  421.  
  422. This program was written by Bruce Guthrie of Wayne Software.  It  is  free  for
  423. use and  redistribution  provided  relevant  documentation  is  kept  with  the
  424. program, no changes are made to the program or documentation,  and  it  is  not
  425. bundled with commercial programs or charged for separately.  People who need to
  426. bundle it in for-sale packages must  pay  a  $50  registration  fee  to  "Wayne
  427. Software" at the following address.
  428.  
  429. Additional information about this and other  Wayne  Software  programs  can  be
  430. found in the file BRUCE.DOC which should be included in the original ZIP  file.
  431. The recent change history for this and the other programs is  provided  in  the
  432. HISTORY.ymm file which should be in the same ZIP file where "y" is replaced  by
  433. the last digit of the year and "mm" is the two  digit  month  of  the  release;
  434. HISTORY.611 came out in November 1996.  This same naming convention is used  in
  435. naming the ZIP file (FILLymm.ZIP) that this program was included in.
  436.  
  437. Comments and suggestions can also be sent to:
  438.  
  439.                 Bruce Guthrie
  440.                 Wayne Software
  441.                 113 Sheffield St.
  442.                 Silver Spring, MD 20910
  443.  
  444.                 fax: (301) 588-8986
  445.                 e-mail: bguthrie@nmaa.org
  446.                 http://www.geocities.com/SiliconValley/Lakes/2414
  447.  
  448. Please provide an Internet e-mail address on all correspondence.
  449.  
  450. 
  451.