File Management Flashcards
Default location for System files
(Variable: %systemroot%
%windir%)
C:\Windows
Default location for Fonts
C:\Windows\Fonts
Default location for Program files
(Variable: %programfiles%)
C:\Program Files
C:\Program Files (x86) on 64-bit systems only
Default location for User files (user profiles)
(Variable: %userprofile%)
C:\Users\username
Default location for Temporary files (per user)
(Variable %temp%
%tmp%)
C:\Users\username\AppData\Local\Temp
What variable identifies the drive letter where Windows is installed?
%systemdrive%
What are the main types of filename systems?
- Long file names supported with FAT32 allows 255 characters including spaces
- Unicode supported with NTFS allows 255 characters including all characters except for /
What are the file extensions for Program files?
.exe
.com
What are the file extensions for Batch files?
.bat
.sh
What are the file extensions for System files?
.dll (dynamic link library)
.drv (device driver)
.vxd (virtual device driver)
What are the file extensions for Document files?
.rtf
.txt
.doc
.wpd
.ppt
.pdf
What are the file extensions for Image files?
.gif
.jpg
.png
.bmp
What are the file extensions for Audio files?
.mp3
.wma
What are the file extensions for Windows Installer files?
.msi
What are the file extensions for Compressed files?
.zip
What are the file extensions for Script files?
.ps1
.vbs
.py
.js
What should you be aware of when it comes to file extensions?
Be aware of the following:
- Executable files (.exe, .com) are program files that can be run. Batch files (.bat as well as other extensions) also run and execute a series of commands, but typically launch another program to interpret the commands in the batch or script file.
- A file extension association identifies the program that is used to create a file. When you open a file that has an associated program, the program is launched and the file is opened within the program.
- When you install an application, file extension associations are created automatically for the file types the application uses.
- If you try to open a file type that is not associated with a program, you will be prompted to identify the program to use to open the file.
- By default, Windows hides the extension for files with associations.
- Use the settings in Folder Options to show file extensions for known file types.
- To change a program associated with a file extension, use Default Programs in the Control Panel, or edit the properties of the file.
What is a file attribute?
A file attribute is metadata that gives certain qualities to a file after the attribute has been assigned
Name and describe the common NTFS file attributes.
Read-only (R)
The R attribute marks a file as read-only meaning that the file cannot be altered by subsequent users.
Hidden (H)
The H attribute hides a file within the file system so that it cannot be viewed or accessed by users that do not have access to its specific filename.
System (S)
The S attribute identifies a file as a system file that cannot be deleted.
Archive (A)
The A attribute identifies if a file has been modified since the last backup.
Encrypted
The encrypted attribute encrypts a file.
Compressed
The compression attribute causes a file to be compressed to save space on the hard drive.
A file can either be encrypted or compressed, but not both.
Indexing
The index attribute specifies how a file is indexed. Indexing allows a system to quickly locate files using additional extensions assigned by the user.
Permissions
NTFS permissions control access to folders and files through the Windows operating system.
- NTFS permissions are available only for files on a partition formatted with NTFS.
- Each file has an access control list (ACL) that identifies users or groups and the actions they can perform on the file.
- Permissions are saved as an attribute of the file.
- Moving NTFS files to another NTFS partition preserves the permissions; moving NTFS files to a non-NTFS partition removes the permissions.
What should you be aware of regarding file attributes?
Be aware of the following regarding file attributes:
- The FAT32 file system supports only the following attributes: R, H, S, and A.
- To change file or folder attributes, edit the properties of the file or folder or use the Attrib command from the command prompt. (You cannot change permissions with the Attrib command.)
- When you copy files from an NTFS partition to a FAT32 partition, attributes not available under FAT32 do not remain with the file.
Use Folder Options to show protected operating system files, or to show compressed or encrypted files in a different color
What should you remember when working with the command prompt?
Remember the following things when working with the command prompt:
- To view the list of commands you can execute, type help. This will display the entire list of available commands.
- To see detailed information about a specific command, type the command followed by /?.
- Adding | more after a command will cause the output to list one screen at a time.
- Press the Enter key to scroll down a line.
- Press the Spacebar to scroll down a screen at a time.
You can repeat a command by pressing the Up arrow key at the command prompt. This will cause the most recent command to appear
“cd” command
Use the cd command to work with the current directory. Common switches used with cd are:
- cd by itself shows the current directory (the current directory is usually shown in the command prompt as well).
- cd [folder name] changes the current directory to the one specified (if the directory is within the current directory).
- cd [full path] changes to the directory specified by the path.
- cd .. changes the current directory to the immediate parent directory (moves up one directory level).
cd /D [file] [path] changes the current drive in addition to changing the directory
“dir” command
Use the dir command to display a list of files and subdirectories in a directory. Common switches used with dir are:
- dir /p pauses output at every page.
- dir /s displays information in subdirectories.
-
dir /a[xx] displays files with the specified attributes:
- Options may be combined, such as /arh, to show read-only, hidden files.
Use - to show files without an attribute. For example, dir /a-r shows files that are not read only
“md; mkdir” command
Use the md and mkdir commands to create (make) a directory. Common switches used with md are:
- md [directory] creates a new directory in the current directory.
md [path] [directory] creates a new directory in the directory specified by the path
“rd” command
Use the rd command to delete (remove) a directory. Common switches used with rd are:
- rd [directory] removes the specified directory within the current directory.
- rd [path] [directory] removes the directory specified in the path.
- rd /s removes subdirectories in addition to files in the current directory.
rd /q will not prompt you before each deletion
“copy” command
Use the copy command to copy files from one location to another. Common switches used with copy are:
- copy [source] [destination] copies the specified file to the new location.
- copy [folder] [*.*] [path] [destination] copies all files with extensions in a folder to the new location.
- copy /a specifies that the file is an ASCII text file.
- copy /b specifies that the file is a binary file.
- copy /n copies files using short filenames.
- copy /y will not prompt you before each overwrite operation.
- copy /v verifies files after they are copied.
Be aware of the following for how moving (copying) files between partitions affects the file attributes:
- When copying files from a FAT32 partition to another partition, the file attributes are retained.
When copying files from an NTFS partition to a FAT32 partition, attributes such as encryption and permissions that are not available in FAT32 are removed
“xcopy” command
Use the xcopy command to copy files and directory trees. Common switches used with xcopy are:
- xcopy /a copies files with the archive attribute set and doesn’t change the attribute.
- xcopy /m copies files with the archive attribute set and turns off the archive attribute.
- xcopy /d copies files changed on or after the specified date. If no date is given, it copies only those files whose source time is newer than the destination time.
- xcopy /p prompts you before creating each destination file.
- xcopy /s copies directories and subdirectories (except empty ones).
- xcopy /e copies directories and subdirectories, including empty ones.
- xcopy /h copies hidden and system files also.
- xcopy /r overwrites read-only files.
- xcopy /k copies attributes. Normal xcopy will reset read-only attributes.
xcopy /y overwrites existing files without prompting