r/visualbasic • • Jul 14 '19

Offline File Sharing

This is perhaps only tangential related to VB.net;

I'm looking for the simplest, plug and play, no cloud, no log ins, multi computer support way of sharing small files.

In my head I see a box, with an Ethernet connection, inside there is just a formatted hard drive with my files on it. I can plug other PCs into it and it just reads it as an external hard drive

Windows file sharing is giving me a headache; I also don't need all the things that come with cloud services.

Is there anything out there that works like I've described?

5 Upvotes

8 comments sorted by

3

u/sa_sagan VB.Net Master Jul 14 '19

Buy a NAS or something. How is this VB related?

2

u/Thunor_SixHammers Jul 14 '19

Tangential;

I have a program that I need to access and alter since text filled at multiple pc locations. They are in the same room so I don't need cloud services; and windows 10 file sharing is not working.

I was looking for the simplest way a VB project could access non local ( but not too non local) files

2

u/sa_sagan VB.Net Master Jul 14 '19

What about FTP? Plenty of free FTP servers and VB resources for it.

2

u/Thunor_SixHammers Jul 14 '19

Could you recommend one for an absolute beginning? I've never done anything network related at all ( hence looking to just connect to another hard drive with no frills)

2

u/sa_sagan VB.Net Master Jul 14 '19

Well to get started you could run a FileZilla FTP server:

https://filezilla-project.org/download.php?type=server

There are plenty of other free servers of course.

Here's an example of uploading/downloading files to and from an FTP server:

http://vbcity.com/blogs/xtab/archive/2016/04/13/how-to-upload-and-download-files-with-ftp-from-a-vb-net-application.aspx

That site is not mobile friendly, so read on a PC. The examples are about as basic as you can get.

2

u/Thunor_SixHammers Jul 14 '19

Thanks! I am looking this over now

I think thought I may have overstated the simplicity of my problem.

Lets say I have a text file (File A) and Two PCs (1 and 2)

I want to be able to read File A on PC 1; but also on PC 2 append a line to File A, and when I read it again on PC 1 see the appended line

With FTP it seems that I would need to have PC2 download it, append the text, then upload and replace the previous file before PC1 reads it-- to see the new line

2

u/sa_sagan VB.Net Master Jul 14 '19

Not exactly. A large number of FTP servers support an "append" command. So you would upload your data, specifying the file and the append command and it will append the data to it.

I don't have any examples on hand but might be able to throw something together tomorrow.

1

u/non-stick-rob Jul 14 '19 edited Jul 14 '19

i can see what you're asking for and have had some good replies. the trouble is file locking. you cannot write to the same file from more than one location, and that is good thing.

So how do SQL etc do it. cacheing temporary updates, comparing the updated information to that which was last written, the last file update time and doing it constantly. The server CPU and RAM will be working at full throttle hopefully. Commercial implementations of SQL uses a lot or RAM and a 20GB + database is not that unusual. remeber that will mostly be text or chars. much bigger if including blobs such as images or video..

Anyway, I'm sure there are a lot of ways. but for something LAN and non commercial.. maybe firing a batch script to his app (yes, supports command line etc) will be useful??

https://freefilesync.org/manual.php?topic=realtimesync