How to dynamically update a File Collection when new files are added to a folder?
I would like to achieve the following:
When a folder is added to a File Collection, if new files are later added to that folder, I want those new files to automatically appear in the collection — essentially achieving a "dynamic update" for the collection.
Is there any script or button that can be used to refresh a collection, so it updates to reflect newly added files in the original folder?
Using Libraries may make more sense, if the aim is to have something that always reflects what’s in a combination of folders.
But there are several other ways to do similar things as well. Which is best will depend on exactly what you’re aiming to do. For example, do you want to be able to remove items without deleting them from disk.
I would like to have a File Collection that automatically includes all the files from a specific folder (i.e., it updates when new files are added to that folder), but I also want to be able to manually remove certain items from the collection without deleting them from the original folder on disk.
Is there a way to achieve this combination — a collection that auto-updates but still allows manual pruning of entries independently?
That sounds like the best solution! A script that monitors the folder and updates the collection automatically would be perfect.
However, since I’m not familiar with scripting or programming, it might be a bit challenging for me to implement. Still, I really appreciate your patient and helpful explanation — thank you, lxp!
Thank you so much, lxp! Your script and detailed instructions have perfectly solved my problem.
What seemed like a difficult task at first became completely manageable thanks to your help. I really appreciate the time and effort you put into this, especially for someone like me who isn’t familiar with scripting. Your support has been incredibly valuable — thank you again!
First of all, thank you again for your generous help and patient explanations — I really appreciate your support throughout this process.
After some testing, I did notice the limitation you mentioned regarding subfolders not being monitored. Since many of the folders I want to track contain nested directories, this does affect my use case. As for the second point about the "non-persistent" tracking of processed files, I haven’t encountered any major issues with it so far, but I’ll keep an eye on it in longer-term use.
I also have a suggestion — would it be possible to allow the script to monitor multiple folder-to-collection pairs at the same time? For example, being able to configure something like:
makefile
复制编辑
D:\Folder1 → Collection1
D:\Folder2 → Collection2
This could be very useful for people managing multiple projects or file sources.
Thanks again for all your effort — your work has been incredibly helpful!
Wow — thank you so much for the updated script and for adding support for multiple folder/collection pairs, as well as recursive monitoring! This really goes above and beyond, and I’m incredibly grateful for the time and expertise you’ve put into helping me.
I tested the new version and it's working wonderfully. The ability to monitor multiple folders at once, each mapped to its own collection, fits my workflow perfectly. Adding the recursive option is especially helpful, as many of my folders have subdirectories that I need to track as well.
Your support has completely resolved my original request — and in fact, provided an even better and more flexible solution than I had imagined. Thank you again for your generosity and detailed guidance!