pctechguide.com

  • Home
  • Guides
  • Tutorials
  • Articles
  • Reviews
  • Glossary
  • Contact

How To Find and Delete a File

How To Find And Delete A File

Method #1: There are several ways to find and delete files, especially when your system is infected with malware. After killing one of the active processes, sometimes windows will refuse to delete the file in question. One trick to getting windows to relenquish control of the file while you’re still in normal mode is to try renaming or moving the file. Sometimes this will force windows into unlocking the file, allowing it to be deleted. The first method (and most user friendly method) to finding a file is to use the windows default search, which is available from Start>Search>Files and Folders… The user can search for a specific file or files, and even base the results on the text found within the file itself. Unless the file in question is a system file, generally speaking, the file should be able to be deleted with relative ease. To delete the file, you can either hit the delete button, or right click on the file and select the delete option. Below is a screenshot of the application.

Method #2: The next method to deleting a file, and specifically during a malware infection, involves using the windows commandline. The reason we will be looking at this method is that sometimes malware will start even during safemode, which will at some point require you to boot up with only the command prompt at your disposal. While the command prompt may be daunting at first to some, it’s actually quite easy to learn and will always prove to be a valuable piece of knowledge to have. To search for a file, you must use the “dir” command, but first we will examine the parameters for it:

Displays a list of files and subdirectories in a directory.

DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N]

[/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4]

[drive:][path][filename]

Specifies drive, directory, and/or files to list.

/A          Displays files with specified attributes.

attributes   D  Directories                R  Read-only files

H  Hidden files               A  Files ready for archiving

S  System files               –  Prefix meaning not

/B          Uses bare format (no heading information or summary).

/C          Display the thousand separator in file sizes.  This is the

default.  Use /-C to disable display of separator.

/D          Same as wide but files are list sorted by column.

/L          Uses lowercase.

/N          New long list format where filenames are on the far right.

/O          List by files in sorted order.

sortorder    N  By name (alphabetic)       S  By size (smallest first)

E  By extension (alphabetic)  D  By date/time (oldest first)

G  Group directories first    –  Prefix to reverse order

/P          Pauses after each screenful of information.

/Q          Display the owner of the file.

/S          Displays files in specified directory and all subdirectories.

/T          Controls which time field displayed or used for sorting

timefield   C  Creation

A  Last Access

W  Last Written

/W          Uses wide list format.

/X          This displays the short names generated for non-8dot3 file

names.  The format is that of /N with the short name inserted

before the long name. If no short name is present, blanks are

displayed in its place.

/4          Displays four-digit years

Switches may be preset in the DIRCMD environment variable.  Override

preset switches by prefixing any switch with – (hyphen)–for example, /-W.

Also keep in mind that during malware infections, some of the files are hidden from normal search parameters. This is why it’s important to use the /A HS option. /S searches all subdirectories, and /T is used to search for files created, accessed or written to within a certain time frame. While /T may be handy, a file’s timestamp can be easily forged or altered, so it’s best to use the /S parameter when searching for a particular file instead. Below is an example of how to use the dir command from the command prompt.

dir asdf.* /s /a hs

Once the location of the file is found, there are two ways to go about deleting the file. The first is simply typing the location, along with the file name using the del command. Which will be shown below.

del c:\temp\asdf.exe

The second method of doing this is to navigate to the folder using the cd command. This is helpful if there are multiple files located within that particular directory. A short example of this combination of commands is shown below.

cd temp

del asdf.exe

Both of these approaches are a matter of personal preference, and there is no “correct” approach to followed. As long as the file is deleted, that’s what matters, especially when removing an occurrence of malware.

Conclusion

There are really only two methods for searching a file, and a handful of ways to delete them. Aside from knowing exactly where the file location is, navigating to said location and deleting the file using windows explorer, both of the discussed methods are effective in getting rid of files. There are free programs on the internet that make the search process somewhat easier, but ultimately, they do the same thing as the windows search option or searching for files via the commandline. Either of these methods that you choose to implement will come in handy when removing malware, or just clearing out junk data manually.

  • How To Kill A Running Process
  • How To Find and Delete a File
  • How to Get Music From Ipod to Computer
  • How to Move Your Store Folder (Outlook Express)
  • OE User Files
  • How to Maintain Your Store Folder -Outlook Express
  • Outlook Express Backup
  • How OE Stores Files on Your Hard Disk
  • How to Find and Delete Files
  • Transferring Programs To A New PC (Windows XP to W
  • Transferring Data Old Computer To A New Computer
  • Migration Software From Windows XP To 7
  • Transferring Software To A New PC
  • Transfer Files From Old Computer to New Computer
  • Problems Accessing Windows Update
  • Fix Hard Disks Running in Compatibility Mode
  • Fatal Exception OE Errors
  • Cleaning out Your Hard Drive Space and Freeing up Disk Space
  • Transferring Software To A New PC

Filed Under: Files & Settings Tagged With: Commandline, Delete, delete a file, File, file with malware, Find, find a file, Malware, Search, Windows

Latest Articles

Intel Mobile Pentium III and Tualatin Pentium III-M Guide

The October 1999 announcement of a range of 0.18-micron Pentium III processors included the launch of the first mobile Pentium IIIs. The new processors - available at speeds of 400MHz, 450MHz and 500MHz and featuring a 100MHz system bus - … [Read More...]

HP Stream 11 – The Cheaper Answer to Chromebooks?

Microsoft probably has now found the contender with Hewlett Packard’s frontliner HP Stream 11 against Google’s Chromebooks in the cheap netbook department. For the budget conscious, they may want to take a good look at this inexpensive piece of a contender. If you only need is to access the web, … [Read More...]

DVD-RAM

Rewritable DVD-ROM drives, or DVD-RAM, employs phase-change technology with some MO features mixed in rather than the pure optical technology of CD and DVD discs and has its roots in the PD optical disc system. A land groove … [Read More...]

20 Cool Creative Commons Photographs About the Future of AI

AI technology is starting to have a huge impact on our lives. The market value for AI is estimated to have been worth $279.22 billion in 2024 and it … [Read More...]

13 Impressive Stats on the Future of AI

AI technology is starting to become much more important in our everyday lives. Many businesses are using it as well. While he has created a lot of … [Read More...]

Graphic Designers on Reddit Share their Views of AI

There are clearly a lot of positive things about AI. However, it is not a good thing for everyone. One of the things that many people are worried … [Read More...]

Redditors Talk About the Impact of AI on Freelance Writers

AI technology has had a huge impact on our lives. A 2023 survey by Pew Research found that 56% of people use AI at least once a day or once a week. … [Read More...]

11 Most Popular Books on Perl Programming

Perl is not the most popular programming language. It has only one million users, compared to 12 million that use Python. However, it has a lot of … [Read More...]

10 Exceptional Books on ChatGPT that Will Blow Your Mind

ChatGPT is a powerful new AI tool that is taking the world by storm. You are going to find a lot of amazing books that will teach you how to make the … [Read More...]

Guides

  • Computer Communications
  • Mobile Computing
  • PC Components
  • PC Data Storage
  • PC Input-Output
  • PC Multimedia
  • Processors (CPUs)

Recent Posts

7 Fun Science Activities for Children

Getting a head start on creating the scientists of tomorrow should happen at a young age. However, even if your kid doesn't become an astrophysicist, … [Read More...]

IStartSurf.com Virus Removal

iStartSurf is another bothersome browser hijacker that is promoted by free download. Like many other hijackers, it will change your browser homepage … [Read More...]

Graphics Card Removal

Replacing your graphics card is easy and the only tools you'll need are a Phillips screwdriver and - just in case you're cack-handed - a pair of … [Read More...]

[footer_backtotop]

Copyright © 2025 About | Privacy | Contact Information | Wrtie For Us | Disclaimer | Copyright License | Authors