Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.
Name: ricardo647 Date: August 21, 2009 at 04:56:30 Pacific
Reply:
@echo off setlocal enabledelayedexpansion set target1="test 1.txt" set target2="test 2.txt" ::targets double quoted pushd "C:\program files\java" for /f "tokens=* delims=" %%a in ('dir /b /s *.*') do ( set cfile="%%~na%%~xa" if /i !cfile!==!target1! del "%%~fa" if /i !cfile!==!target2! del "%%~fa" ) popd
---------- In the above code, target1 and target2 will be deleted in the target folder and in any subfolder bellow it. I do so intending more flexibility, supposing that the entire name of the path can vary from one to other java version.
but you can make changes and restrain the target folder to c:\program files\java\whatever java version\lib\ext\filename.xxxx
Summary: I am attempting to create a batch file to search for a specific file on my computer and delete it. I have been trying to figure it out and cant get it. Thank You for any help! ...
Summary: I found a batch script to search all drives and delete the autorun.inf file on this forum I want that method but change it up a bit. I would like to Search all drives for a specific file and copy the ...
Summary: Sorry, may be i explained not good, english is not my native.. i'll try again. So, i need to search something inside .txt file, then i need that search results to be added into a file name: filename.t...