function runFilesInDir(dir)
	if (fs.exists(dir)) then
	   if(fs.isDir(dir)) then
			files = fs.list(dir)
			for i,v in ipairs(files) do
				runFile(dir .. v)
			end
		else
			runFile(dir)
		end
	end
end

function runFile(file)
	if(not fs.exists(file)) then
		return nil
	end
	if(not fs.isDir(file)) then
		shell.run(file)
	else
		runFilesInDir(file .. "/")
	end
end
