Hardware Reference
In-Depth Information
TABLE 5.6
Deleting folders or files
( continued )
Operating System
Command/Procedure
Example
Windows (command
prompt)
For folders: rd , rmdir , or deltree
rd \myfolder
Deltree also deletes any files and subfolders;
rd doesn't work unless the folder is empty.
rmdir \myfolder
deltree \myfolder
Precede the folder name with a backslash if it
isn't an immediate subordinate of the active
location.
For files: del
del myoldfile.txt
Precede the filename with a path to it if it isn't
contained in the active location.
del C:\Books\
myoldfile.txt
Mac OS or Linux
(command prompt)
For folders: rmdir
rmdir \myfolder
For files: rm
rm myoldfile.
txt
Renaming Files and Folders
In most OSs, the commands and procedures for renaming fi les and folders are identical; no
distinction is made between them.
There is one major thing to watch out for, though, when renaming fi les: fi le extensions.
An extension is a code (usually three letters, but not always) that follows the fi lename,
indicating the type of fi le. The name and the extension are typically separated by a period,
like this: myfile.txt . When you rename a fi le, you should make sure you keep the same fi le
extension. Otherwise, the fi le may be rendered unusable.
Here's where it gets tricky in Windows: by default, Windows hides the fi le extensions
for known fi le types. That means the fi le myfile.txt is likely to appear in a fi le-
management window as myfile . When you rename it, if you type the extension as part
of the new name, you end up with a double extension, like this: myfile.txt.txt . You
won't notice it immediately, though, because the fi nal extension is hidden, as specifi ed
by the OS.
That leads us to a general rule of thumb: if the fi le doesn't show an extension on its
name, don't type one when renaming it. If it does show an extension, make sure you keep
that same extension. If you want to change the display/hide status for known fi le types in
Windows, from any fi le-management window, choose Tools
Folder Options and, on the
View tab, clear the Hide Extensions For Known File Types check box. You'll have a chance
to practice this in Exercise 5.13, later in the chapter.
Table 5.7 summarizes the methods of renaming fi les and folders.
 
Search WWH ::




Custom Search