![]()
[<<]Message[>>] [<<]Author[>>] Subject [<<]Thread
Number : 2824 Date : 2002-09-19 Author : Kan Yabumoto Subject : Re: Reporting File Size of Office Files on Multiple Size(KB) : 5
David: It's good to hear that some IT professionals take care of the files beyond what the company policy states and try to preserve misplaced files on the local disk. While you may capture the XXCOPY screen output, we usually discourage that practice because by redirecting the screen output into a file, the operation will be "invisible" and you may end up waiting for an unexpected user-prompt not knowing that a keyboard input is expected (and the system looks as though it were hung). The /ON or /OA switch are better alternatives which create a text file with varying degree of contents. If you haven't created the handy batch script, where.bat, I suggest you make one now and you will like it: where.bat ------------------------------------------------------ xxcopy /lzdl/s/h/np/q2 %1 %2 %3 %4 %5 %6 %7 %8 %9 ------------------------------------------------------ You may type where c:\*.xls If you have two or more filename patterns (lastname only), you may add them by /IN switches. where c:\*.xls /in*.doc /in*.mp3 The extra %2,.. %9 parameters are for optional switches that you may want, for example, where c:\*.doc /db#730 // files older than 2yrs where c:\ /sz:10m- // files larger than 10 MB where c:\*.jpg /xc:\windows\ // exclude directory -------- The log file will always contains rudimentary stats: Example: ------------------------------------- Directory processed = 1,303 Total data in bytes = 41,388,342 Files selected = 258 ------------------------------------- (with a few more lines like elapsed time, action speed) Going back to your orignal question, You may create a batch file like the following summary1.bat ---------------------------------------------------------------- @echo off xxcopy /ec c:\*.xls /in*.doc /in*.bmp /cfc:\tools\common1.xcf xxcopy /ce c:\ /sz:50m- /cfc:\tools\common1.xcf xxcopy /ce c:\*\favorites\ /cfc:\tools\common1.xcf ... ---------------------------------------------------------------- Note: The @echo off and /EC (1st line only) /CE (other lines) are handy technique which is explained in XXTB #19 http://www.xxcopy.com/xxcopy19.htm Here, common arguments are combined into an external /CF file, c:\tools\common1.xcf. The /CF switch allows you to specify an external file which supply a text of XXCOPY commands so that the batch file will look clean. The /CF file accepts a regular text with valid XXCOPY command switches. Since it provides a mechanism for comments, the text can be made readable. See XXTB #37 http://www.xxcopy.com/xxcopy37.htm Here's my general suggestion common1.xcf ----------------------------------------------------- /* Created 2002-10-20 by Kan Yabumoto this command file is for listing common user files on the volume that are specified in the main command line */ /lzdl // list-only (size, date, longname) /s // process subdirectories /h // include hidden/system files /np // precise-namematching (no SFN matched) /q2 // suppress listing of excluded items /oac:\mylist1.lst // create a log file (append) /oe1 // no error reported to the log file /xc:\windows\ // exclude windows dir /xc:\*\temp*\ // exclude temporary dirs /xc*.jpg // exclude .JPG /xc*.mp3 // ... ------------------------------------------------------ You may use two or more /CF files in the command line (also, /CF file can be nested). /EX is another option to list exclusion items (with /EX, no need for the /X prefix). Here, the /OA (rather than /ON) switch is handy for multiple-invocation of XXCOPY in one batch file which appends one log file to another. You may delete the log file at the beginning of the batch file so that two invocations of the batch file won't duplicate the output into one log file. Note that the list of the files that are selected will not go into the log file unless you add /OF3 in the command (the list can be captured in a separate listing file by a /FO switch) I suggest that you play with the script, especially with the exclusion items. If you were to go for an extra mile to handle user-created files, I would also save the internet browser's "Favorites" settings that are just a subdirectory on a local machine. Also, you may consider saving the cookies. where c:\*\favorites\ // IE's favorites where c:\*\*.ie5\ // cookies You may also consider "gathering" files from all over the volume into one directory. I'm sure many users save files somewhere and never be able to locate them again. The following command may be useful just before discarding everything on the old disk. xxcopy c:\*.xls c:\oneplace\ /sg // gather files See XXTB #16 http://www.xxcopy.com/xxcopy16.htm Kan Yabumoto ======================================================== At 2002-09-19 13:20, you wrote: >Does XXCopy have a summary reporting feature? > >Probably the best way to ask this question is to explain. > >Soon, we'll be converting a number of workstations from NT to XP and >we want to get an intial report from the workstations for how much >we'll have to backup from workstations. We have a policy in our >office of no files on local drives - but that doesn't stop people >from saving them there. So I can turn on the log option, and search >for just files with MSOffice extensions - but is there a way I can >pipe it to a log file with just the amount of space those files would >take - not the full output? > >Thanks
This message if part of XXCOPY's message Archive. The archive contains all the messages posted at Yahoo!Groups: XXCOPY.