FileTerminator Batch/CMD Script - Printable Version +- Support Forums (https://www.supportforums.net) +-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87) +--- Forum: Computer Support Topics (https://www.supportforums.net/forumdisplay.php?fid=4) +---- Forum: Microsoft Support (https://www.supportforums.net/forumdisplay.php?fid=5) +---- Thread: FileTerminator Batch/CMD Script (/showthread.php?tid=21852) |
FileTerminator Batch/CMD Script - AceInfinity - 08-31-2011 Here's a demo of a new script i've been working on. This one is different so be sure you view the video to get an idea of how it works. [yt]http://www.youtube.com/watch?v=nsdfK_vR9LQ[/yt] What this does is it takes the file you dropped onto the batch, and reads the filepaths to the files specified on each line that determines what it deletes. You can use a * wildcard as shown in the video to delete files. It creates a Termination_Log file which you can open in notepad that contains the file deletion script that you used in case you need it for reference. If you want to delete all files of a file extension: Code: *.fileextension Or if you want to delete all files in all file extensions with a specific filename: Code: filename.* Make sure you use a full filepath to the files you want to delete. Don't use anything but the filepath, no quotes, no commas, etc... Example: Code: C:\MyUsername\Something\Something\SomeFile.FileExtension If you use a wildcard, it will ONLY delete the files in the same directory as the one you specify to look for the files using the wildcard. It won't look in subdirectories, just to make this batch script a little safer. I've also put in a confirmation message at the beginning in case you accidentally drop a file on the batch script. Here's the batch script: I save it with the .cmd extension, but you can use .bat for this script as well. Code: @echo off RE: FileTerminator Batch/CMD Script - Prominent - 08-31-2011 That's a great script you made ! I will test it in a few hours . |