in reply to Easy way to check if a file is open needed.
Thanks for your replies.
Sorry I wasn't clear about the purpose. It's just a hobby and I'm trying to learn and solve the puzzle. There's probably alsorts of bad in this, but here goes...
Wife has a USB stick with her work on, and she gets files from co-workers. They need backing up to the cloud in case of loss/forgeting stick. So, I have rsync running on a crontab that copies her USB stick contents into OneDrive. All works well until someone puts an illegal filename into the mix. I don't get to use her computer much 'cos she's nearly always using it. So I want to run a script as a crontab to clean up any issues and stop things from jamming up.
If she's got a file open in MS Word, I don't want it renamed, like it does at present. So I'm wanting to check for file handles in the tree whilst it's being used. When she closes the file, the script will run again at some point and take care of the issues.
Thanks again, and I hope that makes it a bit clearer.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Easy way to check if a file is open needed.
by haukex (Archbishop) on Apr 08, 2019 at 20:18 UTC | |
by Apt_Addiction (Novice) on Apr 08, 2019 at 23:21 UTC | |
by haukex (Archbishop) on Apr 09, 2019 at 08:17 UTC |