Can't move files, lose them in transit

Get help for specific problems
Posts: 2
Joined: 1 Jun 2023

Ascar

Knowledgeable people, please help with advice.

I use FFS for a single purpose. I use Obsidian as my personal knowledge management system and MarkDownload Chrome extension as the web clipper which allows me to grab and store important content from the visited pages. MarkDownload can't save clipped content directly into Obsidian vault directories, instead it has to save the content in a subdirectory of the default Downloads folder set in the the browser. The output generated by MarkDownload is the note file with .md extension and image files from the clipped page saved in a directory which gets named after the page title - both .md file and the image directory get the same name as the name of the clipped page.

Here FFS comes to play, once the changes/new files are detected in e.g. X:\Downloads\MarkDownload directory the real-time sync copies the new files automatically to the designated directory inside the Obsidian vault.

My challenge is that once the clipped note is saved to the clippings directory in the vault I can't manipulate it (move it to another directory as an example) because the moment I move the note it gets re-created by FFS from the downloads location. So, I need to delete the files from the Downloads location manually which is quite a hassle. I made 2 batch files which delete content from the Downloads location and I added calls to these batch files in the post-sync action in the real-time sync settings. This is where I face problems. I tried both "on success" and "on completion" conditions but out of 5 note clip attempts 3-4 of them fail and I get nothing copied to the vault and files disappear from the original download location - so the batch files are called as expected and the original files get deleted, however the files which FFS should copy get lost in transit.

Here is what I see in the log and I guess that my batch files are deleting the sync.ffs_lock file before the copying process completes. If this is right how can I rectify this?
Obsidian Clipping MD Files  9/20/2023  4:04:09 PM
 Completed with errors
Errors:        1
Items processed:        1 (0 bytes)
Total time:        00:00:00
Errors and warnings:
4:04:09 PM    Error:    Cannot delete file "R:\OD\OneDrive\DOWNLOADS\MDC\sync.ffs_lock".
ERROR_FILE_NOT_FOUND: The system cannot find the file specified. [DeleteFile]

4:04:09 PM    Info:    Comparison finished: 4 items found – Time elapsed: 00:00:00
4:04:09 PM    Info:    Synchronizing folder pair: Custom <>
    R:\OD\OneDrive\DOWNLOADS\MDC
    R:\OneDrive\MY STUFF\VAULTS\MY VAULT\CLIPPINGS
4:04:09 PM    Info:    Creating file "R:\OneDrive\MY STUFF\VAULTS\MY VAULT\CLIPPINGS\clipped_page_name.md"
4:04:09 PM    Info:    Source item "R:\OD\OneDrive\DOWNLOADS\MDC\clipped_page_name.md" is not existing
4:04:09 PM    Error:    Cannot delete file "R:\OD\OneDrive\DOWNLOADS\MDC\sync.ffs_lock".
ERROR_FILE_NOT_FOUND: The system cannot find the file specified. [DeleteFile]
Thanks in advance for any suggestion. If my flow is wrong please tell me whether I can accomplish what I am trying to get at all.
User avatar
Posts: 4867
Joined: 11 Jun 2019

xCSxXenon

4:04:09 PM Info: Source item "R:\OD\OneDrive\DOWNLOADS\MDC\clipped_page_name.md" is not existing
This seems suspicious... As if the file system is damaged. Try running an ADMIN command prompt and then run 'chkdsk /f'
You'll have to restart the PC, but then try it again
Posts: 2
Joined: 1 Jun 2023

Ascar

This seems suspicious... As if the file system is damaged. Try running an ADMIN command prompt and then run 'chkdsk /f'
You'll have to restart the PC, but then try it again
No, this is not a file system integrity issue. I do this stuff regularly and I exclude a possibility this kind of behavior caused by the files system issues.
User avatar
Posts: 4867
Joined: 11 Jun 2019

xCSxXenon

Are you assuming is isn't a file system issue or have you actually verified that?