Xenom Apperance 0 Posted March 18, 2020 Share Posted March 18, 2020 Recently, I had and idea that I could do the big "factory" for any software, that would copy and paste the software )such as openos or data card software) to floppy disks (yeah, that idea is stupid). But I have gone to a problem. I have a REALLY HUGE stack of disk drives, but I do not want to copy every program to every floppy disk manually (I would need to get the dress of floppy, I would need to copy and blah), but what IF the disk drives have their own adress? What if I could just write these programs via the adress of the disk drive? Of course, if you have any other idea, then I will be very happy to get any solution. Quote Link to post Share on other sites
tromp_ 0 Posted May 22, 2022 Share Posted May 22, 2022 late reply and you have probably lost interest in this project but... you could use local writeTo = {} local ignoreDrives = {} -- If the address is contained within a list of drive addresses to be ignored, return false -- Otherwise return true. Used to filter out RAID arrays, local disks, or other floppies you do not wish to write to function filter(addr) return not ignoreDrives[addr] end -- Loop over all drives, and if they are not blacklisted add them to a list to write to for _,addr in pairs(component.list("filesystem")) do if filter(addr) then table.insert(writeTo, addr) end end -- Loop over all drives that are going to be written to and write to them -- This is a bit more pesudo-code than actual code as I dont really know how your internal structure for data representations may vary (i.e; writing multiple files that are name sensitive) -- This function could also be 'inlined' with the loop checking whether a filesystem should be written to for _,addr in pairs(writeTo) do write(writeTo, data) end Sure its a pain to get the address of every drive you dont want to write to but its easier than having to change the recorded address every time you insert a new floppy. You can minimise the amount of blacklisting you would need to do by using a machine (likely a server) that is connected to as few filesystems as possible. You would apply a similar approach for unmanaged drives as well, though I suspect they are not as common and you may get away with not needing to create a blacklist for them. Quote Link to post Share on other sites