Hello everyone
I;m new to this forum and also a newbie to programming.
I have the following batch file which i have managed to come upto. find below
set "file=\\servernameA\C$\dferert\tretevf\erwerew\yuyur\gtytr
\testing.txt"
set "answer="
if exist "%file%" (
echo found the file on server servernameA
echo found the file on server servernameA >>"file.log"
set /p "answer=Delete the file? [y/N] :"
)
if /i "%answer%"=="y" del "%file%"
I need to change the functionality of the above script to search a file if the path is not specified. We have 2 drive on about 40 servers, so lets assume we want to search a file that could exist anywhere either in c drive or g drive. could even be in sub folders. the script should find
this file and ask before deleting. please help
find files
Moderator: DosItHelp