Posted 24 November 2013 - 10:37 AM
Hi!
This is a small program I've spent some time on today, that allows you to easily copy one program, from a computer to a floppy disk, and vice versa.
Tutorial
We now want to copy "disk/copy" to "startup" on the next computer. To do this, take your disk, and place it
in another disk drive, next to your other computer.
Code
Pastebin Code - rHYQQxRu
I know its not the best code. Only the second successful one I've wrote. I find it useful, and I hope you do too!
Nick
This is a small program I've spent some time on today, that allows you to easily copy one program, from a computer to a floppy disk, and vice versa.
Tutorial
Spoiler
For this example, I will copy a startup program from one computer onto another.We now want to copy "disk/copy" to "startup" on the next computer. To do this, take your disk, and place it
in another disk drive, next to your other computer.
Code
Spoiler
--visuals
term.clear()
term.setCursorPos(1,1)
print("Nick's Program Changer")
term.setCursorPos(1,3)
print("Enter target program:")
--main code
sleep(1)
input = read()
term.setCursorPos(1,6)
print("Enter replacement program:")
sleep(1)
input2 = read()
exist = fs.exists(input)
if exist == true then
fs.delete(input)
fs.copy(input2,input)
sleep(3)
print("Process Completed")
else
fs.copy(input2,input)
sleep(3)
print("Process Completed")
end
--reset visuals
sleep(1)
term.clear()
term.setCursorPos(1,1)
Pastebin Code - rHYQQxRu
I know its not the best code. Only the second successful one I've wrote. I find it useful, and I hope you do too!
Nick