Can't seem to get file.Find to work

So far I’m having a terrible time trying to figure out why file.Find is not finding text files.

With this code:


local files, directories = file.Find( "addons/buildingtips/data/tutorial/simple/*.txt", "GAME", "namedesc" )
local returntable = {}
		returntable["simple"] = {}
		returntable["intermediate"] = {}
		returntable["advanced"] = {}
		
	local k = 1
	while k < #files do	
		print("found: " .. files[k])
		if(string.find(files[k], "tutorial")) then
			if directories[k] == "simple" then
				print("simple " .. files[k] )
				table.insert(returntable["simple"], files[k])
			elseif directories[k] == "intermediate" then
				print("intermediate " .. files[k] )
				table.insert(returntable["intermediate"], files[k])
			else
				print("simple " .. files[k] )
				table.insert(returntable["advanced"], files[k])
			end
		end
		k = k + 1
	end

It should output all files in the locations provided. I noticed it doesn’t recurse subdirectories, which is fine. I just want it to find a directory.

For some reason, I can’t get it to see any directories I manually place. I can get that function to read adv_duplicator files, get it to see the persist directory in data, and even see the default ulx setup in the ulx folder. However, applying the appropriate path to something that I created makes it fail.

Try calling file.Find without the “addons/buildingtips/” at the first argument