removing files from a folder

so in my app there is a user defined folder and i have the path to the folder in a variable and in the user defined folder there are a few files

filename.c
filename.o
filename.mod.o
Module
Makefile

where it says filename it means that those are all the same name. so is there a way to remove filename.o and filename.mod.o ?

thanks

tell application "Finder"
	set L to files of alias ((path to desktop folder as text) & Test:") as alias list
	repeat with F in L
		if name extension of F is "o" then delete F
	end repeat
end tell

works great, thanks.