0
0
Intro to Computingfundamentals~20 mins

Copying, moving, and deleting files in Intro to Computing - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
File Operations Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding file operations: Copy vs Move

Imagine you have a file named report.txt in your Documents folder. You want to organize your files by putting report.txt into a folder named Work.

Which of the following best describes the difference between copying and moving this file?

ACopying renames the file in Documents; moving creates a shortcut in Work without changing the original.
BCopying deletes the original file and creates a new one in Work; moving duplicates the file in both folders.
CCopying duplicates the file into the Work folder and keeps the original in Documents; moving transfers the file to Work and removes it from Documents.
DCopying compresses the file before placing it in Work; moving encrypts the file in Documents.
Attempts:
2 left
💡 Hint

Think about whether the original file stays where it is after the operation.

trace
intermediate
2:00remaining
Trace the result of deleting a file

Consider this sequence of actions on a computer:

  1. Create a file named data.csv in the Downloads folder.
  2. Move data.csv to the Desktop.
  3. Delete data.csv from the Desktop.

What is the state of data.csv after these steps?

A<code>data.csv</code> no longer exists on the computer.
B<code>data.csv</code> exists only on the Desktop.
C<code>data.csv</code> exists only in Downloads.
D<code>data.csv</code> exists in both Downloads and Desktop.
Attempts:
2 left
💡 Hint

Remember what happens to a file when you delete it from its current location.

Comparison
advanced
2:00remaining
Comparing file operation commands

Below are four command-line instructions for copying a file named notes.txt from the folder Projects to Archives. Which command correctly copies the file without deleting the original?

Acopy Projects/notes.txt Archives/ && rm Projects/notes.txt
Bcp Projects/notes.txt Archives/
Crm Projects/notes.txt && cp Projects/notes.txt Archives/
Dmv Projects/notes.txt Archives/
Attempts:
2 left
💡 Hint

Recall which command is used to copy files and which is used to move or delete.

identification
advanced
2:00remaining
Identify the error in file deletion command

Which of the following commands will cause an error when trying to delete a file named summary.docx?

ARemove-Item summary.docx
Brm summary.docx
Cdel summary.docx
Ddelete summary.docx
Attempts:
2 left
💡 Hint

Consider common commands used in Windows, Linux, and PowerShell.

🚀 Application
expert
3:00remaining
Predict the final file locations after multiple operations

Given the following sequence of file operations:

1. Copy image.png from Pictures to Backup.
2. Move image.png from Pictures to Work.
3. Delete image.png from Backup.

Where does image.png exist after these steps?

AOnly in the Work folder.
BIn both Work and Backup folders.
COnly in the Backup folder.
DNo longer exists anywhere.
Attempts:
2 left
💡 Hint

Trace each step carefully and consider what happens to the file in each folder.