batch-filecommand-line-argumentsfile-search

BAT script search for a particular type of file and execute a command


I want to search a particular file type(.plt) and then I want to execute a command line command(Eg. Change file type). I am working in windows 7.

Can I write a .bat script to do this issue?

Please help me.....please give me some example.....


Solution

  • for /r %i IN (*.plt) DO echo %i

    will list all of the .plt files in the current directory and sub-directories, replace echo with the command of your choice