Make detection Files with batch

May 18, 2009

using batch programming, we can detect a file on the computer using “Windows OS”. FileDetector can be use for all file extension that we know like .Mp3, .Doc, .3 gp, .wmv, .txt, and other files that we know. following examples of ideas to make the FileDetector Program :

- check Mp3 files on a LocalDisk / Drive D: \
- Check in the sub folders and all sub folders in Drive D: \

Code:

@ echo off
title FileDetector
if not exist D: \ goto finished
for /R D: \%%d in (*. mp3) do if exist %%d goto fileExist
goto fileNotExist
: fileExist
echo detected Mp3 Files on localDisk D..
goto finished
: fileNotExist
echo Mp3 File not Found on localDisk (D:\) !!!
: finished
echo.
echo.
echo Finish .. Press anykey to exit
pause> nul

Copy Paste the Code in the NotePad and then save it with the extension .BAT example: File_detector.bat

after saved,. please try to run the file with a Double Click Filedetector.bat. FileDetector with the program we can develop to become more complex again. after knowing the simple basic code , we can create a more useful FileDetector, and with understand the code we can create the ideas for more useful purposes on a computer wich using windows operating system.
for detect hidden files we can combine the code with attrib code (Read about set or changes files attributes)


A D V E R T I S E M E N T





Related Post:


One Response to “Make detection Files with batch”

  1. [...] Read more computer article’s about Make Detection Files with batch [...]

Leave a Reply