This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Gamezdude's profile picture

File type extension

Started by Gamezdude, 18 June 2014 - 07:57 PM
Gamezdude #1
Posted 18 June 2014 - 09:57 PM
Programs are saved as 'File' on the PC (Real PC) but what is the exact extension called?

Example, Text document = .txt
wieselkatze #2
Posted 18 June 2014 - 10:01 PM
There is no extension, it's just a raw file.
Extensions just "mark" certain files as a specific type, so it'll be opened with the standard program for that type of file.
MKlegoman357 #3
Posted 18 June 2014 - 10:01 PM
If you're talking about CC files, they have no extension. Lua files have .lua extension
CometWolf #4
Posted 18 June 2014 - 10:08 PM
You could save it as whatever filetype you wish, and your computer would treat it accordingly. Just add ".whatever" to it.
Gamezdude #5
Posted 18 June 2014 - 10:11 PM
ok so no extension, no .filetypehere

ok so when im making a new program in notepad++ what should i save it as? shall i just delete the file extension or….?
wieselkatze #6
Posted 18 June 2014 - 10:41 PM
As CometWolf pointed out, it doesn't matter.
If you save it as yourprogram.txt, type yourprogram.txt in the shell to run the program.
If you save it as yourprogram.thisisawesome, type yourprogram.thisisawesome in the shell to run the program.

With or without file extension, it's just a name, so it simply doesn't matter. Do it the way you like :P/>
Gamezdude #7
Posted 18 June 2014 - 10:50 PM
Ah I understand now!

Ooooo I can create my own extension! Interesting!