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

Script Saving

Started by Raziel200480, 02 November 2012 - 05:05 AM
Raziel200480 #1
Posted 02 November 2012 - 06:05 AM
I wrote a template for inputting information that would be displayed on a monitor on the floppy drive connected to the computer. I was wondering if there was a method for "saving as" instead of just saving, so that when I fill in the template, I can save it as another name so it doesn't overwrite the template itself, or if there's another method for doing this.
Orwell #2
Posted 02 November 2012 - 06:29 AM
I wrote a template for inputting information that would be displayed on a monitor on the floppy drive connected to the computer.
What do you mean with that line? 'displayed on a monitor on the floppy drive'..?

Also, are you talking about the fs API, or about the edit program?

EDIT: I think I get it now. You got a script on a floppy. That script is a template for displaying stuff on a monitor. Is that correct? Well, you can copy the template first with the 'cp' command. That way, you never edit the original template. Let me know were I missed the point. :D/>/>
KaoS #3
Posted 02 November 2012 - 07:19 AM
basically copy the file and then edit it, that way you are making a new, modified copy and keeping the original
civilwargeeky #4
Posted 02 November 2012 - 08:00 AM
I might be misunderstanding but to copy it from the disk to the computer under a different name then type
 copy disk/(program name) (new name) 
KaoS #5
Posted 02 November 2012 - 08:08 AM
yes, that is outside of a program though, in a program use

fs.copy('disk/'..name, newname)