Chapter 4: File Management


In Brief

Files are the backbone of any information system. They hold the data you work with and make up the programs you use. As a computer user , everything you do involves interacting with files. Finding, deleting, creating, and modifying files are actions you do every day, often without even noticing it.

As administrators, we've all dealt with users who tried to back up their entire system to the server or start their own MP3 (Motion Pictures Experts Group Layer-3 Audio) server with their user directory. Although Windows 2000 provides disk quota management, it does not include a method to target and remove the offending files. In addition to eating a disk's free space, users also have a tendency to save files with strange names and extensions while storing the data anywhere they please .

And while users are slowly tearing at the file system, the system is also filling the disk with temp files, orphaned files, and system logs. With more user data and application files being placed on a system daily, keeping the file system healthy is a constant race that never ends. In this chapter, you will learn how to clean up your file system and perform file- related tasks .

A Word of Caution

This chapter contains many scripting examples on copying and moving files. Copying and moving files and folders has various affects on NTFS encryption, compression, or permissions. For example, a task as simple as copying a file may cause you to lose NTFS permissions set on a secure file. The following list explains the affects of copying and moving NTFS files and folders:

  • Copying Files/Folders within NTFS drives will cause the object to inherit NTFS permissions of the target folder.

  • Moving Files/Folders between two NTFS drives will cause the object to inherit NTFS permissions of the target folder.

  • Moving Files/Folders within the same NTFS drive will cause the object to retain its NTFS permissions.

  • Copying Compressed Files/Folders within NTFS drives will cause the object to inherit the compression setting of the target folder.

  • Moving Compressed Files/Folders between two NTFS drives will cause the object to inherit the compression setting of the target folder.

  • Moving Compressed Files/Folders within the same NTFS drive will cause the object to retain its compression.

  • Copying or Moving Compressed Files/Folders to a non-NTFS drive will cause the object to lose its compression.

  • Copying or Moving Encrypted Files/Folders within NTFS drives will cause the object to retain its encryption.

  • Copying or Moving Encrypted Files/Folders to a non-NTFS drive will cause the object to lose its encryption.

  • Copying Unencrypted Files/Folders to an NTFS Encrypted Folder will cause the object to become encrypted.

  • Moving Unencrypted Files/Folders to an NTFS Encrypted Folder will not cause the object to become encrypted.




Windows Admin Scripting Little Black Book
Windows Admin Scripting Little Black Book (Little Black Books (Paraglyph Press))
ISBN: 1933097108
EAN: 2147483647
Year: 2004
Pages: 89

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net