This chapter covers some of the common tasks facing administrators when it comes to managing the Windows filesystem. We'll not only touch on the really basic tasks such as creating, deleting, renaming, and moving files and folders, but more advanced topics such as viewing a list of all open files and identifying the process that has a file locked. Using a Graphical User InterfaceYou are undoubtedly familiar with the all-purpose file, folder, and shared folder management tool, Windows Explorer. With it you can create, move, rename, and delete files and folders as well as hide, encrypt, and make them read-only. As you'll see, this is the most often used graphical tool in this chapter. You are also probably familiar with the Shared Folder MMC snap-in (fsmgmt.msc), which is commonly seen as a part of the Computer Management tool. This snap-in allows you to do just about anything with shares (i.e., create, delete, see who is using them, etc.). Using a Command-Line InterfaceAs you might expect, there are a host of command-line tools to manipulate files and folders on Windows XP. Table 8-1 lists the command-line tools used in this chapter and the recipes they are used in.
Using Downloadable SoftwareSysinternals (http://www.sysinternals.com) produces several file-related utilities, and we use many of them in this chapter. They include File Monitor (Recipe 8.19) for monitoring file activity, Fundelete (Recipe 8.3) for replacing the recycle bin, Shareenum (Recipe 8.24), for enumerating share points on a network, Process Explorer and handle for listing all the file handles a particular process has open (Recipe 8.20), junction for creating junction points (Recipe 8.20), sdelete for securely deleting files (Recipe 8.4), and strings for searching for text strings in binary files (Recipe 8.9). The other downloadable tools we describe in this chapter include PowerDesk Pro for managing files (Recipe 8.10), WinZip for compressing files (Recipe 8.14), PGP for encrypting files (Recipe 8.15), setacl for setting auditing on files (Recipe 8.18), and folders from the command line and shortcut for creating shortcuts from the command line (Recipe 8.6). Using VBScriptBetween WMI and WSH, you have the ability to automate reading, writing, and searching files and folders. Unfortunately, the WMI file and folder classes don't provide the capability to do basic manipulation, which is where WSH comes in. Table 8-2 lists all the WSH and WMI classes used in this chapter.
|