I don't know if this has been answered before(i looked online but couldn't find one), but how can i send a file (.exe if possible) over a network to another computer that is connected to the network? I tried sockets but i could only send strings and i've tried to learn ftplib but i don't understand it at all or if ftp is even what i am looking for, so i am at a complete standstill. Any input is appreciated (even more so if someone can explain FTP, is it like socket? All the examples i've seen don't have a server program where the client can connect to.)
To share a file or folder over a network in File Explorer, do the following: Right-click (or long-press) a file, and then select Show more options > Give access to > Specific people. Select a user on the network to share the file with, or select Everyone to give all network users access to the file.
Two computers can be easily connected to share the files between them or to share the internet, printer between them. The process is usually simple and can be done with a few hardware devices and a bit of software knowledge.
A. Python3
We can use http.server
for this. From SO answer here, SimpleHTTPServer
is moved to http.server
in python3
.
python -m http.server
Python2:
I use SimpleHTTPServer
for this sometimes:
python -m SimpleHTTPServer
...which would serve the files in the current directory on port 8000. Open your web browser on the other computer and download whatever you want.
To know the IP address of your computer, you can use (in Ubuntu) ifconfig
, e.g:
$ ifconfig
enp0s31f6 Link encap:Ethernet HWaddr xx:xx:xx:xx:xx:xx
inet addr:10.0.0.3 Bcast:10.0.0.255 Mask:255.255.255.0
In windows it is ipconfig
.
Then, in the other computer, you send the browser to: http://10.0.0.3:8000.
B. If you have SSH enabled you could use paramiko to connect and SFTP transfer whatever you want.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With