The Notebook Review forums were hosted by TechTarget, who shut down them down on January 31, 2022. This static read-only archive was pulled by NBR forum users between January 20 and January 31, 2022, in an effort to make sure that the valuable technical information that had been posted on the forums is preserved. For current discussions, many NBR forum users moved over to NotebookTalk.net after the shutdown.
Problems? See this thread at archive.org.

    Real Quick Question: What is this batch script

    Discussion in 'Windows OS and Software' started by yehrulz, Jul 10, 2008.

  1. yehrulz

    yehrulz Notebook Consultant

    Reputations:
    97
    Messages:
    268
    Likes Received:
    0
    Trophy Points:
    30
    This 1 line is found in a bat file. What does it do?

    del /F /S /Q /
     
  2. swarmer

    swarmer beep beep

    Reputations:
    2,071
    Messages:
    5,234
    Likes Received:
    0
    Trophy Points:
    205
    It appears to delete all the files on your disk (that it has privileges to delete).

    Open up a command prompt window and type "del /?" to see all the options to the delete (del) command.

    The final slash I think is the drive's root directory.
     
  3. Ayle

    Ayle Trailblazer

    Reputations:
    877
    Messages:
    3,707
    Likes Received:
    7
    Trophy Points:
    106
    That looks pretty malicious... Where did you get that from?
     
  4. lowlymarine

    lowlymarine Notebook Deity

    Reputations:
    401
    Messages:
    1,422
    Likes Received:
    1
    Trophy Points:
    56
    That command will in theory delete (del), recursively (/S), all files, including read-only and OS-critical files (/F), without prompting (/Q) on your root drive (/). Pretty nasty stuff...except Windows doesn't use "/" as it's root directory, it uses "C:". So most likely that command will do nothing, unless you or I are missing something.
     
  5. swarmer

    swarmer beep beep

    Reputations:
    2,071
    Messages:
    5,234
    Likes Received:
    0
    Trophy Points:
    205
    Some commands treat / as a synonym for \ in file paths. And if the drive (C :) is omitted from the path, it uses the current drive I think, which is probably the system drive by default.

    For example, open up a command prompt and type: "cd /"
    It puts me at C:\

    However, "dir /" doesn't seem to work.

    I'm too scared to try "del /". ;)

    EDIT: I tried it with the /P (prompt first) switch:

    C:\>del /P /
    Invalid switch - "".

    So I guess you're right... it doesn't like it.