Bird
0
0

What will this PowerShell command do?

medium📝 Command Output Q5 of 15
PowerShell - File and Directory Operations
What will this PowerShell command do?
Copy-Item -Path 'data.csv' -Destination 'backup\data.csv'
ACopies 'data.csv' to the 'backup' folder
BMoves 'data.csv' to the 'backup' folder
CDeletes 'data.csv' and creates a new empty file in 'backup'
DRenames 'data.csv' to 'backup\data.csv' in the same folder
Step-by-Step Solution
Solution:
  1. Step 1: Understand Copy-Item command

    Copy-Item copies a file from source to destination without deleting the original.
  2. Step 2: Analyze the given paths

    The command copies 'data.csv' into the 'backup' folder with the same file name.
  3. Final Answer:

    Copies 'data.csv' to the 'backup' folder -> Option A
  4. Quick Check:

    Copy-Item action = Copies file [OK]
Quick Trick: Copy-Item duplicates files, Move-Item moves them [OK]
Common Mistakes:
  • Confusing copy with move
  • Thinking it deletes original file
  • Assuming it renames the file

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PowerShell Quizzes