home *** CD-ROM | disk | FTP | other *** search
- NEW.DOC
-
- Scott R. Houck
-
- 2/18/89
-
-
- NEW (version 1.7) is a utility that locates "new" files, that is,
- files created as of a certain number of days ago. It can also find "old"
- files if the number of days is a negative number. It can search the
- entire disk (or disks) if desired and can accept wildcards.
-
- The syntax is: NEW [filespec [filespec...]] [options]
-
- Options and filespecs can be in any order. Filespecs must be
- separated by at least one space. Valid options are:
-
- /h Show help screen
- /? Same as /h
- /n Show files SINCE the number of days specified by n
- /-n Show files BEFORE the number of days specified by n
- /p Pause when screen display is full
- /s Search specified directory and its subdirectories
- /e Search entire disk
- /d Include directories in listing
- /do Include directories ONLY in listing
- /j Junk option -- include files with corrupted dates
- /i Ignore the environment variable NEW if it is defined
-
- If filespec is omitted, *.* is assumed. Also, a "day" in this
- program starts at 6:00 am and ends at 5:59 am the following day. Here
- are some examples:
-
- C>NEW List files in the current directory created
- or modified as of 6 am
-
- C>NEW *.C List files as of 6 am with the extension .C
-
- C>NEW /7 List files as of one week ago
-
- C>NEW /E Search entire disk for files as of 6 am
-
- C>NEW C: D: /E Search all of drives C: and D:
-
- C>NEW \MSC\*.C /7 /S Search for .C files as of one week ago
- starting from the \MSC directory and
- searching all subdirectories of \MSC
-
- C>NEW /7/S \MSC\*.C Same as previous example above (options and
- filespec can be in any order)
-
- C>NEW D:/E/365/P Search all of drive D: for files created up
- to a year ago and pause when the screen is
- full
-
- C>NEW /-365 Search for files older than one year
-
- C>NEW /D Search for today's files, including any
- directories that were created
-
- C>NEW /DO /7 /E Display any new directories created in the
- last 7 days over the entire disk
-
- C>NEW /J Display new files, including any "junk" files
- that is, files that have corrupted time
- stamps
-
- C>NEW C: D: /5000/E/D >ALLFILES.TXT
-
- List every blessed file and directory on
- drives C: and D: since negative infinity
- (1/1/80), sorted by date, time, and filename,
- and put them in a file called ALLFILES.TXT
-
- And now for a ridiculous example...
-
- C>NEW C:\MSC\PROG\*.C D:\DBASE\*.DBF E: /30/D/I/J/P/S
-
- Display files up to a month old that match
- the three filespecs listed and their
- subdirectories, ignore the environment
- variable NEW if it is defined, include
- directories and "junk" files, and pause
- when the screen is full
-
-
- NEW Environment Variable
- ------------------------
-
- If you find that you would like certain options or filespecs as
- defaults, you may set up an environment variable called NEW that includes
- the options or filespecs. For example, if you always want NEW to pause,
- put the following command in your AUTOEXEC.BAT file:
-
- SET NEW=/P
-
- If you normally want to search all of drives C: and D:, you could use:
-
- SET NEW=C: D:/E
-
- If you've set up the NEW environment variable, but want to override
- it temporarily, use the /I option on the command line. For example, if
- you have issued SET NEW=C: D:/E but just want to use NEW on the current
- directory, type in NEW/I. Any other options may be added as well. For
- example, NEW/I/P/7.
-
- You may not specify the options /H, /?, or /I in the NEW environment
- variable. (Wouldn't make sense, now, would it?)
-
- NEW first processes the command line options/filespecs. If /I is
- not issued on the command line and the NEW environment variable is defined,
- the environment variable is then processed.
-
-
- NOTES
- -----
-
- 1. The file display is sorted by descending date and time. If
- two or more files have the same date and time, they are then
- sorted by ascending filename.
-
- 2. If /E or /S is chosen, the directories are displayed as they
- are traversed.
-
- 3. If the full path name of the file is very long, the first
- directory is shown, followed by an ellipsis (...), followed
- by the ending portion of the path name. I did this because I
- am using NEW on a network drive sometimes, and we tend to get
- carried away with subdirectories! The /S option comes in handy
- here. For example, if I want to see only my data area on the
- network, I'll type in NEW \DATA\USERS\SCOTT /S. Doing a /E on
- our network drive can take 2-3 minutes. However, the /E option
- is interesting on a network as it shows the current day's
- activities for multiple users (assuming you have supervisory
- rights).
-
- 4. The "junk" option (/J) was added to include files with corrupted
- dates. Such files defeat the purpose of NEW in that they appear
- to be new files when they really aren't. However, if you really
- want to see them, use /J. In fact, if you are trying to locate
- such files, use /J in conjunction with /E to search the entire
- disk.
-
- 5. Normally, I'm not interested in when directories were created,
- but if you really want to include them, use /D. If you want
- to see ONLY directories (no regular files), use /DO. Note that
- the /D and /DO options are mutually exclusive.
-
- 6. The /P option has been enhanced to take into account the number
- of text lines being used. That is, if you are using 43-line mode
- with an EGA or 40- or 50-line mode with a VGA, NEW will pause
- after the appropriate number of lines have been displayed.
-
- 7. Since I am allowing multiple filespecs, it is necessary to show
- the complete path for filenames, even if /E is not being used.
- For example, if you type in NEW C: D:, the current directories
- on C: and D: will be checked. You need to know just where those
- files really are. Consequently, if you are just using NEW on
- your current directory, the full path will also appear. This
- may seem a bit annoying. To compensate, I am displaying the
- drive and directory path in lower case and the filename in upper
- case. If you don't like this, well, you got the source code,
- right? :-)
-
- 8. This program is dedicated to the public domain. If you would
- like to contact me about bugs, enhancements, or contributions
- that could inspire me to create ever more ingenious utilities,
- I can be reached at the following address:
-
- Scott R. Houck
- 200 N. Pickett St. #314
- Alexandria, VA 22304
-