answersLogoWhite

0


Best Answer

Use the DEL command followed by the names of the files using wildcards. The optional /Q switch turns off prompting for each file matching the wildcard. The double quotes are required to cater for file names containing spaces.

DEL /Q "*.jpg" "*.docx"

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you delete jpg and docx files using batch file only with a single command?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you delete hidden files using batch scripts?

You can just delete hidden files with the same del command, but since the files are hidden you need to map the location of the hidden folder in the command so the batch file knows where to look and delete. @Echo off del "location of hidden files and/or folders" /Q /F /S exit


How do you make a batch to delete files with specific name pattern?

application


What are batch files used for?

batch files are used to run a series of commands at once. people who work on computers daily and have a series of files or programs to start and command to run often create a batch file to do it automatically and save time.


How do you delete a folder from command prompt?

In Dos-just write (DEL Folder Name) this command will delete all the Files inside that folder,then write (RD Folder Name) This will Remove your Folder. Remember both command contain Same folder name. Which you want to Delete.(DEL)command is used to delete Files. (RD) command is used to delete Folder


How do you get a batch file to delete a directory when it says Acess is Denied?

If it says access is denied that means that access is deined, you can't delete it. I think you are probably trying to make a batch file virus to delete system files and is trying to make the batch file delete everything, but came into the access is deined problem.


What program opens bat files?

Batch files(.bat) open in command prompt(cmd). They can be edited in notepad or an equivalent text editor.


What does Files stand for?

exe stands for Executable. FYI... com stands for command bat stands for batch


You are deleting a file from batch file Somehow the delete function not deleting some time?

Some files can be protected from being deleted either because they are important system files or belong to a person who protected it, so if you don't own the rights for the file/folder you wish to delete, the batch file will not delete and will just say "Access is Denied".


How do you delete 0 byte files using DOS?

The command for deleting a file in DOS is DEL. If the file you are trying to delete is in the current directory, type DEL followed by the full filename. E.g. del file001.txt If there are multiple files, the wildcard * can be used. del file*.txt will delete all the text files that start with 'file' del file*.* will delete all the files that start with file. del *.txt will delete all the text files. del *.* will delete all the files in the current directory. It is possible to delete files in another directory by typing the full path and filename del c:\folder01\*.* will delete all the files in the directory c:\folder01\ DEL will not affect hidden files, but careless use of this command could damage your operating system so use with care.


What command you use to delete a file?

Del is used to delete a file in command prompt.


When copying files with a batch command how do you indicate spaces?

Put the entire drive:\path\filename in double quotes (").


How do you permanently delete every file from a mac?

I actually just submitted this question to answer it to help other people out. To delete all files from a mac you simply make sure you are running Finder, then you type in the following commands. Command N Command A Command Delete Command Shift Delete Enter Bang all gone