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]