Multiple choice technology testing

What is the output of the following code snippet @echo off %1 %2\%3 .\ Save the above as “test.bat” Execute the batch file with the commandline parameters test.bat xcopy d: test.txt

  1. Syntax Error

  2. Copies “D:\test.txt” to current directory

  3. Invalid arguments

  4. None of the above

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

The batch script uses parameter substitution where %1, %2, and %3 represent command-line arguments. When executed with 'test.bat xcopy d: test.txt', these become: %1=xcopy, %2=d:, %3=test.txt. The command expands to 'xcopy d:\test.txt .\' which copies the file from D drive to the current directory.