File - Delete from Command Prompt

Page 2 of 2 FirstFirst 12

  1. Posts : 2
    W7 Professional 64
       #10

    Heh, aah, well it's kinda funny really. You explained what the switches did, I got the picture I was playing with fire.
    Just didn't anticipate I'd faceplant at the worst possible time.
    Figured I'd try and get a warning out.


    But, I CAN still access my restore points, so it's looking like more of an inconvenience than a loss anyway.
    So, I dunno, I guess in spite of my misfortune at the moment, thanks for making the guide anyway. The net effect is vastly, vastly positive, so just keep that in mind. :)
    Guys like you make the internet a great (if potentially dangerous) resource.
      My Computer


  2. Posts : 72,047
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #11

    No problem. I'm just glad you were able to recover.
      My Computer


  3. Posts : 2
    windows 7 home basic
       #12

    need help in command prompt


    hi,

    can i know how to delete specific file extensions in whole of computer irrespective of number of drives without asking confirmation for deletion and also including hidden , read only type files?

    For example , say i need to delete an .jpg file which is present in say all drives with read only or hidden property. please help

    main points is :
    1) need to delete particular file extension.
    2) need to delete from whole computer permanently without asking confirmation.
      My Computer


  4. Posts : 72,047
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #13

    Hello Chow, and welcome to Ten Forums. :)

    You could use the command below in an elevated command prompt, but you'll need to repeat it for each specific drive letter. Substitute C in the command for the drive letter.

    DEL /F /S /Q /A "C:\*.jpg"
      My Computer


  5. Posts : 2
    windows 7 home basic
       #14

    Hi Brink,

    DEL /F /S /Q /A "C:\*.jpg"

    above command works but as you mentioned , i need to repeat for all drives.

    I have a situation where I will be not knowing the number of drives and their Letters, so is there any command to delete from all drives of a computer?
      My Computer


  6. Posts : 72,047
    64-bit Windows 11 Pro for Workstations
    Thread Starter
       #15

    Not that I know of, but you could use "DiskPart" with "List Volume" to see the drive letters.
      My Computer


  7. Posts : 1
    Windows 7 64bit
       #16

    I was trying to use the DEL command within a batch file. But how do I get the command to delete and not display either the command and the resulting files that are found. Echo Off does not appear to work.
    I used
    Code:
     @echo OFF
    DEL /S /Q *.bak
    ECHO bak files Deleted
    DEL /S /Q *.prjpcb.zip
    ECHO Project History Zips Deleted

    But this shows the files being found and deleted. I just want to show the ECHO items only and not all the files!
      My Computer


 
Page 2 of 2 FirstFirst 12

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 08:58.
Find Us