Return to Snippet

Revision: 62968
at March 27, 2013 04:08 by stianlagstad


Initial Code
@echo off
cd %USERPROFILE%\Desktop\somefolder
for %%f in (*.c) do (
	echo %%~nf
	gcc -c %%~nf.c -o %%~nf.o
)
pause

Initial URL


Initial Description
This will loop through files in somefolder with the extension .c, print out the filename and compile the files.

Initial Title
Batch code to process files with a certain filename in a directory

Initial Tags
directory

Initial Language
DOS Batch