Quote:
Originally Posted by kovidgoyal
I'm afraid not. There is no way to make "resetting file attributes" robust across OSes and filesystems. It's up to you to make sure file attributes for files you put there are correct.
|
Is there some reason why os.chmod() won't do the trick? According to the docs "Although Windows supports chmod(), you can only set the file’s read-only flag with it" which would be sufficient in this case... and of course it works with all Unices. That maybe leaves a handful of diehard OS/2 or VMS users out in the cold, but hey...
Quote:
Simply have your batch file create and delete a temporary file in the auto-add folder, that should be enough to trigger a rescan. Or do a file rename to a new filename, though whether that is sufficient or not will depend on the file watching semantics of Qt on your platform.
|
OK, this works. For the benefit of other Windows victims out there, I now have this:
Code:
@echo off
cd "\path\to\Calibre\autoadd"
if not exist *.* exit/b
attrib -r -h -s *.*
echo >foo.xxx
del foo.xxx
Then I run this every few minutes with the Task Scheduler.
I'd still prefer a Preferences option though!