IT Computer Zone

All About Article Computer, Software Technology News & IT Solution

Make detection Files with batch

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)

Related posts:

  1. Introduction Batch Programming batch programming language is used by the Command Prompt (CMD),...
  2. Set or changes File Attributes batch programming can utilize for the purpose of the computer...
  3. Automatic Shutdown PC With simple batch programming after knowing the basic programming batch (batch introduction) we know...
  4. Protect files and folder from virus attactks once we know how to anticipate the virus, how to...
  5. Simple Steps to anticipate Virus There are a few simple steps to protect your computer...

||

18 May, 2009 (06:07) | programming | By: computerzone

Comments

Pingback from Trick to keep a text file
Time July 6, 2009 at 1:04 am

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

Write a comment