Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Comprehensive List of FileKill Commands with Descriptions
#1
Comprehensive List of FileKill Commands with Descriptions

**FileKill** is a command-line utility used to delete files securely or forcefully on Windows systems. It is particularly useful for removing stubborn or locked files that cannot be deleted using standard methods. Below is a detailed list of FileKill commands, along with descriptions and examples.



1. Deleting a Single File
Description: Deletes a specified file.
Code:
filekill.exe [FilePath]
Example: To delete the file `C:\Temp\unwanted.txt`:
Code:
filekill.exe C:\Temp\unwanted.txt

2. Deleting Multiple Files
Description: Deletes multiple files specified by their paths.
Code:
filekill.exe [FilePath1] [FilePath2] ...
Example: To delete `file1.txt`, `file2.txt`, and `file3.txt`:
Code:
filekill.exe C:\Temp\file1.txt C:\Temp\file2.txt C:\Temp\file3.txt

3. Deleting Files in a Directory
Description: Deletes all files within a specified directory.
Code:
filekill.exe [DirectoryPath]\*
Example: To delete all files in `C:\Temp`:
Code:
filekill.exe C:\Temp\*

4. Force Deleting a File
Description: Forcefully deletes a file, even if it is locked or protected.
Code:
filekill.exe -f [FilePath]
Example: To force delete `C:\Temp\lockedfile.txt`:
Code:
filekill.exe -f C:\Temp\lockedfile.txt

5. Secure Deletion (Overwrite Before Deletion)
Description: Securely deletes a file by overwriting it with random data before deletion, making it unrecoverable.
Code:
filekill.exe -s [FilePath]
Example: To securely delete `C:\Temp\sensitivefile.txt`:
Code:
filekill.exe -s C:\Temp\sensitivefile.txt

6. Deleting All Files Matching a Pattern
Description: Deletes all files matching a specific pattern (e.g., all `.txt` files) within a directory.
Code:
filekill.exe [DirectoryPath]\*.extension
Example: To delete all `.log` files in `C:\Logs`:
Code:
filekill.exe C:\Logs\*.log

7. Deleting Read-Only Files
Description: Deletes files even if they are marked as read-only.
Code:
filekill.exe -r [FilePath]
Example: To delete a read-only file `C:\Temp\readonlyfile.txt`:
Code:
filekill.exe -r C:\Temp\readonlyfile.txt

8. Deleting Files Recursively
Description: Deletes files recursively within all subdirectories of a specified directory.
Code:
filekill.exe -R [DirectoryPath]
Example: To delete all files within `C:\Temp` and its subdirectories:
Code:
filekill.exe -R C:\Temp

9. Deleting Empty Files
Description: Deletes files only if they are empty (0 bytes).
Code:
filekill.exe -e [DirectoryPath]\*
Example: To delete all empty files in `C:\Temp`:
Code:
filekill.exe -e C:\Temp\*

10. Deleting Files Without Confirmation
Description: Deletes files without prompting for confirmation.
Code:
filekill.exe -y [FilePath]
Example: To delete `C:\Temp\unwantedfile.txt` without confirmation:
Code:
filekill.exe -y C:\Temp\unwantedfile.txt

11. Deleting Hidden Files
Description: Deletes files even if they are hidden.
Code:
filekill.exe -h [FilePath]
Example: To delete a hidden file `C:\Temp\hiddenfile.txt`:
Code:
filekill.exe -h C:\Temp\hiddenfile.txt

12. Logging Deletion Operations
Description: Logs the details of deletion operations to a specified file.
Code:
filekill.exe -l [LogFilePath] [FilePath]
Example: To delete `C:\Temp\unwantedfile.txt` and log the operation to `C:\Logs\delete.log`:
Code:
filekill.exe -l C:\Logs\delete.log C:\Temp\unwantedfile.txt

13. Deleting System Files
Description: Deletes files that are system-protected. Use this command with caution as it can affect system stability.
Code:
filekill.exe -sys [FilePath]
Example: To delete a system file `C:\Windows\system32\protectedfile.dll`:
Code:
filekill.exe -sys C:\Windows\system32\protectedfile.dll

14. Deleting Files on Next Reboot
Description: Schedules the deletion of a file on the next system reboot, useful for locked files.
Code:
filekill.exe -delayed [FilePath]
Example: To delete `C:\Temp\lockedfile.txt` on the next reboot:
Code:
filekill.exe -delayed C:\Temp\lockedfile.txt

15. Displaying Help Information
Description: Displays the help information for the FileKill command, listing all available options and their descriptions.
Code:
filekill.exe -?
Example: To display help information for FileKill:
Code:
filekill.exe -?



Conclusion

The **FileKill** command is a powerful utility for securely and forcefully deleting files on Windows systems. By mastering these commands, you can efficiently remove stubborn, locked, or protected files, ensuring they are deleted securely and permanently.

Happy Scripting!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)