What does the following code snippet do? IF EXISTS c:\test.txt del c:\test.txt Dir %WinDir%\ >> c:\test.txt

  1. Deletes c:\test.txt and lists the contents of c:\Windows to c:\test.txt

  2. Errors out as test.txt does not exist

  3. Deletes c:\test.txt, if exists, and lists the contents of c:\window to c:\test.txt

  4. Errors out as test.txt does not exist and rolls back all the commands.


Correct Option: C

Find more quizzes: