0% found this document useful (0 votes)
18 views15 pages

ITEC 274 - Lab 4 FileManagement

this is lab

Uploaded by

Tisha Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views15 pages

ITEC 274 - Lab 4 FileManagement

this is lab

Uploaded by

Tisha Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

ITEC 274: Lab # 4 – File Management [75 pts]

[Tisha Patel, ITEC274-102]

Instruc ons
To get started, download, and open the word document (274_exerciseE_FileManagement.docx) a ached to this exercise in BlackBoard / Lab.
You will submit your answers for the exercise via this word document. No other documents or formats will be accepted. Submit via
BlackBoard / Labs.

This exercise is run on a Windows computer (or a Windows VM). You will explore opera ng system le management using the Windows
command line and GUI. You will use the following commands as described in the table below.

Command Name Descrip on


wmic Windows Management Instrumenta on Is a command-line interface used for
Command-Line interac ng with Windows Management
Instrumenta on (WMI). WMI is a set of
speci ca ons from Microso for
consolida ng the management of devices
and applica ons in a network from Windows
compu ng systems. WMIC allows users to
perform administra ve tasks, query system
informa on, and execute WMI opera ons
directly from the command prompt
(ChatGpt).
cd Change Directory Changes current working directory
md Make Directory Create a new directory (folder)
rd Remove Directory Remove a directory (folder)
tree Graphic representa on of directory structure
type Displays content of text le
fi
ti
ti
ti
ti
ti
ti
ti
ti
ti
ti
ti
fi
ft
ti
ti
ti
tt
fi
sort Sorts the input from a le or command
output and displays the sorted data
File Explorer GUI for managing le content

1. Check volume/disk informa on using GUI and command line. [10 pts]

a. Run Windows File Explorer (not Internet Explorer)

b. Select the H: (if you can) OR C: (if the H: drive is not available) and show its proper es (Right click / Proper es).

i. [] [2 pts]
fi
fi
ti
ti
ti
c. What is the volume name of H: OR C: (you may not have a volume name on the drive)? Answers:__STUDENTSHARE-O_Z
_______

d. What is the volume type of H: OR C: volume? Answers:___Network drive______

e. What type of le system is on H: OR C: volume? Answers:_NTFS________

f. How much storage capacity is on the H: OR C: volume? Answers:___1.00 GB______

g. How much space is available (free) on the H: OR C: volume? Answers:_0.99 GB________

h. How much space is used on the H: OR C: volume? Answers:__96.0 KBcls_______

i. Start a Windows command line session


i. Using one wmic command determine computer volume informa on.

ii. Note: wmic volume switch will only show local storage so use wmic logicaldisk switch

iii. Hint: start with wmic get logicaldisk get … (and add the appropriate parameters to list the drive le er, volume name,
volume size and amount of free space)

j. How many volumes are on your computer? Answers:_there are 2 volumes________

k. List the drive le er, volume name, volume size and amount of free space of each volume on your computer.

i. [Clear screen, run command and then copy/paste results here] [1 pt]
fi
tt
ti
tt
l. Show the single, full command (with all parameters/switches) used to answer the ques ons above.

2. Working with les, directories and sub directories in Windows command line. [20 pts]

a. Start a Windows command line session

b. Select the H: (if you can) OR C: (if the H: drive is not available) (use drive le er: ).

c. Make a directory called ITEC274ExerciseF in the root directory of your H: OR C: drive.

d. Make a subdirectory called My274Color in the ITEC274ExerciseF directory made above.

e. What command(s) did you use to make the directory? Answers:__mkdir ITEC274ExerciseF, mkdir My274Color_______

f. Use notepad to create an ASCII text le containing your favorite color.


i. Name the le MyFavoriteColor.txt and be sure to save it in H:\ITEC274ExerciseF\My274Color or C:
\ITEC274ExerciseF\My274Color.

g. Return to the command line and verify the MyFavoriteColor.txt le you created exists.

h. What command(s) did you use to verify the le exists? Answers:_cd ITEC274ExerciseF, cd My274Color, dir________

i. Change to \ITEC274ExerciseF and remove the My274Color subdirectory.


i. (hint: rd alone will only remove empty directories – check help… rd /? for command to remove the directory and its
les)
j. What command(s) did you need to use to remove My274Color and its les (MyFavoriteColor.txt)? Answers:_rd /s /q
My274Color________

k. Make a subdirectory called My274Files in the ITEC274ExerciseF directory made above.

l. What command(s) did you use to Make the directory? Answers:__mkdir My274Files_______

m. Make a subdirectory called My274Friends in the ITEC274ExerciseF directory made above.


fi
fi
fi
fi
fi
fi
fi
tt
ti
n. What command(s) did you use to Make the directory? Answers:_mkdir My274Friends________

o. Use notepad to Make an ASCII text le containing with your name, course and sec on.
i. Name the le My le.txt and be sure to save it in H:\ITEC274ExerciseF\My274Files or C:\ITEC274ExerciseF\My274Files.

p. Return to the command line and verify the My le.txt le you created exists.

q. What command(s) did you use to verify the le exists? Answers:_cd ITEC274Exercise, cd My274Files, dir________

r. What size (in bytes) is your My le.txt? Answers:__24 bytes_______

s. Copy the le My le.txt to H:\ITEC274ExerciseF or C:\ITEC274ExerciseF (keep same le name).

t. What command(s) did you use to copy My le.txt to H:\ITEC274ExerciseF or C:\ITEC274ExerciseF? Answers:__copy
“MyFile.txt” “H:\ITEC274ExerciseF\MyFile.txt” _______

u. Rename the le H:\ITEC274ExerciseF\My le.txt or C:\ITEC274ExerciseF\My le.txt to MyFile2.txt (in same directory).

v. What command(s) did you use to rename My le.txt to MyFile2.txt? Answers:_ren “H:\ITEC274ExerciseF\MyFile.txt”
“MyFile2.txt” ________

w. Copy the le My le2.txt to My le3.txt (in same directory).

x. What command(s) did you use to copy My le2.txt to My le3.txt? Answers:__copy "H:\ITEC274ExerciseF\My le2.txt" "H:
\ITEC274ExerciseF\My le3.txt"
y. _______

z. Delete the le My le2.txt.

aa. What command(s) did you use to delete My le2.txt? Answers:__del "H:\ITEC274ExerciseF\My le2.txt"_______

3. Use notepad to create an ASCII text le containing the rst name of 3 friends / people you know.
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
ti
fi
fi
fi
a. Name the le MyFriends.txt and be sure to save it in H:\ITEC274ExerciseF\My274Friends or C:
\ITEC274ExerciseF\My274Friends.

b. Return to the command line and verify the MyFriends.txt le you created exists.

c. What command(s) did you use to verify the le exists? Answers:_cd ITEC274ExerciseF, cd My274friends, dir________

d. What size (in bytes) is your MyFriends.txt? Answers:___20 bytes______

e. Copy the MyFriends.txt you just crested in \ITEC274ExerciseF\My274Friends to your \ITEC274ExerciseF\My274Files directory
(use same le name).

f. What command(s) did you use to copy MyFriends.txt? Answers:__copy "H:\ITEC274ExerciseF\My274Friends\MyFriends.txt"


"H:\ITEC274ExerciseF\My274Files\MyFriends.txt"_______

g. Clear the screen

h. What command(s) did you use to clear the screen? Answers:_cls________

i. Change directory to ITEC274 in the root directory of your H: OR C: drive.

j. What command(s) did you use to change directory? Answers:__cd H:\ITEC274ExcersiceF_______

k. Use the tree /f command to show the directory structure and les of your directory H:\ITEC274 or C:\ITEC274.

i. [Paste screen shot showing the structure and les of your directory…] [2 pt]
fi
fi
fi
fi
fi
fi
l. What does the tree command do? Answers:_tree command displays a graphical, tree-like view of the directory structure,
showing folders and subfolders within a speci ed directory path.________

m. What does the /f in tree /f do? Answers:__the /f op on in tree /f includes the lis ng of all les in each folder, in addi on to
showing folder structure._______
4. Describe a disk drive, folder and le and the purpose each serves on a computer. [15pts]
a. Disk Drive _a disk drive is a physical or virtual storage device in a computer where data is stored and accessed.___________________
b. Folder _a folder is a virtual container within a le system on a disk drive that organizes les and other folders.______________________
fi
fi
fi
ti
fi
ti
fi
ti
c. File__a le is a collec on of data stored on a disk drive, represented by a unique name and le extension. Files contain types of
informa on, including text, images, audio, and other executable instruc ons.________________________
5. Computer les are categorized as either a program or data/document. Describe each and provide an example of each. [15 pts]
a. Program__a program is a le that contains executable code allowing a computer to perform speci c tasks or func ons.
____________________
b. Data __Data les store informa on that is used by programs to perform speci c tasks but doesn’t contain executable
instruc ons._______________________
c. Document__a document is a type of data le created and used by applica ons to store user-generated content, o en in a readable or
editable format. ___________________

6. I/O redirec on in Windows command line is used for le system and text manipula on. [15 pts]

7. Start a Windows command line session

a. Change your current directory to c:\ or h:\ (or another drive on your computer)

b. Make a directory (md) called ITEC274 (C:\ITEC274)

c. Use notepad to create an ASCII text le named containing the following names (one student per line):
Ingold, Le e
Crouse, Rosella
Tuller, Vernon
Demayo, Taina
Harlow, Mary
Wideman, Lavelle
Delcid, Emerita
Villarreal, Marlana
Rubel, Robert

8. Save the le created above in c:\ or h:\ITEC274. Name it StudentNames.txt

9. Exit notepad (you will use this le later)

10. Clear the screen

11. Use the type to display the contents of StudentData.txt on the screen
a. [Paste screen shot showing StudentNames.txt contents using type command here…] [2 pts]
ti
fi
ti
tti
fi
fi
ti
fi
ti
fi
ti
fi
fi
fi
fi
ti
ti
fi
fi
ti
fi
ti
ft
12. Now use dir but redirect the output to a le named dir_H les.txt

13. What command did you use for the above redirec on? Answers:__dir > dir_H les.txt_______

14. How big (# bytes) is the output le (dir_H les.txt)? Answers:__147 bytes_______
fi
fi
fi
ti
fi
fi
15. Use the type command to show the contents of the dir_H les.txt.
a. [Paste screen shot showing dirH les.txt contents using type command here…] [2 pts]

16. Clear the screen


17. Use the sort command and redirec on to sort the contents of the StudentNames.txt (display results on the screen)
fi
ti
fi
18. What command did you use for the above redirec on? Answers:__sort StudentNames.txt_______

19. Show the sorted results of StudentNames.txt.


a. [Paste screen shot showing the sorted StudentNames.txt contents here…] [2pts]

20. Now use the sort command and redirec on to sort the contents of the StudentNames.txt and redirect output to a le called
sorted_StudentNames.txt
ti
ti
fi
21. What command did you use for the above redirec on? Answers:__sort StudentNames.txt > sorted_StudentNames.txt_______

22. Use the type command to show the contents of the sorted_StudentNames.txt.
a. [Paste screen shot showing sorted_StudentNames.txt contents here…] [2pts]

23. Clear your screen

24. Change your current directory to c:\windows (or the windows directory on your computer)
ti
25. Use dir to show directory lis ng of c:\windows – likely a very long lis ng

26. Now pipe the output of the dir command to the more command to scroll through the directory lis ng of c:\windows

27. What command did you use for the above redirec on? Answers:_dir | more________

28. Show the rst page/screen of the directory lis ng of c:\windows


a. [Paste screen shot showing rst page/screen of the directory lis ng of c:\windows here…] [2pts]
fi
fi
ti
ti
ti
ti
ti
ti

You might also like