✅ How to save an assembly text file to an actual file?
I have a text file in my assembly that I want to save as an actual file. How would I go about doing this? Can't get my search terms right today! File is "game.bat"

6 Replies
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
as in a file on the actual file system. E.g. to save it as "C:\Users\Dave\Game.bat"
at runtime in the application
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
Naturally I looked at that - but how do you get that working with the fact that the text file is in the application assembly. E.g. File.WriteAllText(outfile, Templates.Game.bat) would not work
Unknown User•6mo ago
Message Not Public
Sign In & Join Server To View
smth?
nemmind - did it via Resources instead. For anyone in a similar boat, add the desired file as a Resource, then do following:
(the resources file drops the ".bat" from the assembly file)