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

Files not transfering

Started by diamondpumpkin, 26 May 2015 - 12:28 AM
diamondpumpkin #1
Posted 26 May 2015 - 02:28 AM
When I try to transfer a file via fs api. It says nothing like it should in lua, take the disk out of the drive put it in another computer's disk drive go into it's dir, the file I tried to transfer is not there. But the main computer that transferred the file in the first place thinks the files there.
Bomb Bloke #2
Posted 26 May 2015 - 02:31 AM
… and? Where's the code you're using? At the moment, with just the information you've given, all that can be said is "ur doin it rong".
Lyqyd #3
Posted 26 May 2015 - 02:31 AM
Moved to Ask a Pro.
diamondpumpkin #4
Posted 26 May 2015 - 02:35 AM
It's called fs api in lua. Didn't pick that up along the way? O_o
Bomb Bloke #5
Posted 26 May 2015 - 02:47 AM
Got that loud and clear - you're attempting to use the fs API, and you're doing it wrong.

But you've given no specific info on how you're attempting to use it. This makes it rather difficult to correct you!
diamondpumpkin #6
Posted 26 May 2015 - 03:03 AM
I'm using fs.copy("am","disk/am") to transfer the am file to the disk.
Lyqyd #7
Posted 26 May 2015 - 03:07 AM
Okay, that should copy the file onto the disk, but it won't delete the am file. How are you checking for the file's presence on the other computer after inserting the disk into a drive adjacent to it?
diamondpumpkin #8
Posted 26 May 2015 - 03:19 AM
I'm using cd disk then I'll type dir in the computer I use with the drive to check it
Bomb Bloke #9
Posted 26 May 2015 - 05:51 AM
But the main computer that transferred the file in the first place thinks the files there.

So you're saying that if you do:

cd disk
dir

… on the computer which originally did the copy, you'll see the file listed…

take the disk out of the drive put it in another computer's disk drive go into it's dir, the file I tried to transfer is not there.

… but once you place the disk in another computer's drive, the same set of commands shows… what? Nothing?
diamondpumpkin #10
Posted 26 May 2015 - 01:21 PM
Yes. it just shows what dir I'm in.
Bomb Bloke #11
Posted 26 May 2015 - 01:26 PM
So the file's there, then it's not - what you're saying indicates it's got nothing to do with the API.

What happens if you stick the disk back into the original computer, after placing it in the second, and do another directory listing? Does the file come back?

I'm just about suspecting you've got two disk drives connected to that second machine, and are getting a directory listing from the wrong one.
diamondpumpkin #12
Posted 26 May 2015 - 02:05 PM
Using the same disk, I think the main computer is just bugged. I can't really get my files off there with out having to rewrite them. When I try to copy the files on to the disk, the main computer thinks it's there, it will even say file exists when I type fs.copy("am","disk/am"). Then I put the disk into another computer's disk drive, go into cd disk, then I type dir. No files are in the disk. Would you like me to make a video on this to make it clear?
Bomb Bloke #13
Posted 26 May 2015 - 02:53 PM
Then I put the disk into another computer's disk drive, go into cd disk, then I type dir. No files are in the disk.

If, immediately AFTER doing this, you stick the disk back into the first computer's drive and pull a directory listing, what does THAT tell you?
Edited on 26 May 2015 - 10:54 PM
diamondpumpkin #14
Posted 26 May 2015 - 07:32 PM
It tells me the files that should be on the disk but are not. I've also tried looking for the files on different computers/drives.
Lyqyd #15
Posted 26 May 2015 - 08:03 PM
How does it tell you that they should be on the disk? How does it tell you that they aren't on the disk?
diamondpumpkin #16
Posted 26 May 2015 - 08:26 PM
When I go into a different computer, try to transfer the files from to the disk to the other computer. Says file does not exists. When I type cd disk then dir. No files are there.
flaghacker #17
Posted 26 May 2015 - 09:32 PM
Could you perhaps clarify what you are saying with some scrwenshots?
diamondpumpkin #18
Posted 26 May 2015 - 09:42 PM
I made a video, shouldn't be long before I post it
diamondpumpkin #19
Posted 26 May 2015 - 09:52 PM
Here is the video I made: https://youtu.be/Pq_s-rB6ufs
Cranium #20
Posted 26 May 2015 - 10:02 PM
Do me a favor: remove the disk drive, then type "ls /". Methinks you may have inadvertently added a "disk" directory on top of the disk drive. If that's the case, then all you need to do is remove the directory.
diamondpumpkin #21
Posted 26 May 2015 - 10:08 PM
No matter where I place it the drive on the computer. It still thinks those files are on the disk. But they're not, I put a brand new disk in the drive each time I put the adjacent to the computer. Still, think the same files are on there.
Cranium #22
Posted 26 May 2015 - 10:25 PM
Let me repeat: Remove the drive. Completely. Then do as I suggested, because as I said, you may have created a "disk" directory, and the filesystem is writing to the local memory rather than the disk memory. If you see that there is still a "disk" directory after removing the drive, then it confirms my suspicions. From there, it's only a simple matter of removing the directory, then remounting the disk drive correctly.
diamondpumpkin #23
Posted 26 May 2015 - 10:29 PM
Ahh, I see where you're going. I didn't understand the last one because you said "Methinks"

I see what I did wrong! I made another dir named "disk" then it was making a second dir when I put the disk in called "disk2". I dun derped.
Thanks for the help!