Script file deleted while in use

I have a Windows 11 computer and a Windows 10 computer I installed basic Syncthing, not one of the premade instances. I followed the Syncthing basic installation and setup instructions. My system consists of two PC’s next to each other physically. They are both setup to share drive C:\ full control, with each other. To do the actual setup of the system I followed an advice video on YouTube that showed how to add and share folders to Syncthing. Setup went smooth and I did not have a problem following the setup. I did get one warning that stated (to my best recall) “Warning the folder is a root directory of a master …” when I added the folders I wanted to share between the two PC’s. I could not find, using google, any good information on what that means or if it could cause a problem. I added the directories and ignored the warning. There are about 3000 files on each computer with the extension .LUA. These are script files created by myself and are used by running programs to control program flow. For three days everything worked very well and the files on the two computers were kept equal by Syncthing. Then today I was working on one of the .LUA files, adding some addition instruction. I do this by pausing the script, make the changes, save the file and then reload the program into memory. Syncthing then is suppose to update the identical file on my other computer to reflect the new changes. The script file is NOT running on the other computer. The problem came up when I reloaded the script file I had changed, I got an error message (from the script program) the file no longer exists. I used File Explorer and looked at the directory where the .LUA file had been, it was deleted. I had a backup so I didn’t lose the file but I have no idea why it got deleted. I have been doing this for over two years (before installing Syncthing) and never lost a file. Previously I was just copying files when I changed them frop PC to PC. I removed Syncthing because I don’t know if this might occur again. Any suggestions on what I did wrong would be appreciated. Thank you in advance

This is a very, very bad idea. Don’t do that.

Syncing all of the boot drive of any device…I can’t think of a corner case where that might be a good idea. It most certainly is a terrible idea for Windows, and particularly two different Windows versions.

What is the use case for Syncthing here?

1 Like

Is this a Windows share between both computers’ C:\ drives? So that should take care of file system permissions.

As I understand it, the warning you got was having two Syncthing folders nested in one another without an ignore pattern to remove the sub-folder from the parent.

I don’t think I can articulate the exact reasons why this is a bad idea, but “doom loop” comes to mind.

If you must add two folders as Syncthing folders with one the child of the other, either don’t sync them to the same remote device, or add an Ignore pattern that will prevent the parent from syncing the child folders to the same remote device as the parent folder.

An example file system on device Alpha:

Documents\
          Receipts
          Statements

If Documents is a Syncthing folder, and Receipts is another Syncthing Folder, don’t sync both to the same remote device Bravo. Its okay to have Documents sync to Bravo and Receipts sync to Charlie.

1 Like

I am not sure what you mean by syncing the boot drive. The C: drive is my Boot drive but I am not syncing the entire C:\ drive. I am syncing a subdirectory of the C: drive. Specifically “C:\Users\bbruc\OneDrive\Desktop\RIFT HOME\Character Folders” that is the nly directory I am syncing (plus all the subfolders of that directory). I may have misled you when I stated the C: root drives were shared drives but that isn’t a part of the what I am using Syncthing for. They are shared so that I can manually copy from one drive to the other. The Use of the syncing is as follows. I have two computers, on each computer I am running a program that needs data. I have to log into a seperate account for the program to run but I still need access to the data files. Because of the way the main program is designed (not by myself) I can not tell the seperate accounts where (what directory) the data files will be in. The program installation creates and uses it’s own directories. Since I want the same data files on each computer but the data files are independant, I have to sync the data files. That is all I am trying to accomplish. I had been doing it using Windows OneDrive but OneDrive has such a terrible lag time when updating files between computers (sometimes changes take over 30 seconds to update) I gave up on OneDrive and started to just copy/paste (manually) all the data file when I changed them. I wanted to automate that syncing. Thanks for the reply

Let me specify a bit more what I am doing. The windows 11 Computer is named “C of CLX”, the path to the data files is; C:\Users\bbruc\OneDrive\Desktop\RIFT HOME\Character Folders The windows 10 Computer is named “C of Extreme”, the path to the data files is; C:\Users\bbruc\OneDrive\Desktop\RIFT HOME\Character Folders

When I set up Syncthing Folders (I did the same on both computers) Syncthing found both of my computers (by name) and gave each one a random number code. I acknowleged on each computer that those were the correct computers. I deleted the Default Folder I then added the directory (given above) and used it’s name from the pulldown box When I acknowledged on the other computer that name, that is when I got the warning message. Since I couldn’t find any information about what that warning actually means, after reading about an hours worth of unrelated discussions none of which applied to me, I ignored the warning. (I am recalling all of this from memory I believe that was all that was required to setup) The two directories then sync’d and I tested the syncing by changing a couple files in those directories and all was well. I used Syncthing for two days, it was running fine, keeping my files equal and in a timely manner. The problem arose while I was editing one of the data files, after I finished editing I saved the file and used an internal command to “run” the data. As I pressed the run command, I was given an error message stating “Operation could not be performed, the file has been deleted”. I verified that it was in fact deleted. At that point I removed Syncthing. Appreciate your response

It looks like I misunderstood you @BBrucer, I thought you meant you were using Syncthing to sync the c:\ directory tree between the two PCs. That’s what I want you to not do :slight_smile:.

2 Likes

My fault, I was trying too hard to describe the system and the problem all in one fell swoop. I can see how it was confusing.

1 Like