Page 1 of 1

IDs on watchfolder

PostPosted: Mon Jun 27, 2016 10:07 am
by matze
hi, is there any possibility automaticaly add a IDs on a new clip in a watchfolder?
i want to make my client able to add or remove clips by simply copy and delete files to/from a "windows-folder" watched by pb.
what i also need is that wd recognizes when a new clip was added to the watchfolder.
thanks for your reply.

Re: IDs on watchfolder

PostPosted: Mon Jun 27, 2016 10:42 am
by Christian Hinxlage
Hi Matze,

yes that´s possible with the script:

If your project folder is a watched folder, it will automatically refresh when you add content to the referring folder on your harddisk.
That´s what the watched folder is made for.

If you want to refresh the folder and file id´s within your watched folder via the Widget Designer you have to be aware of the following.

Changing the ID´s in Pandoras Box manually will show up a warning that the ID´s you want to change are in use.
To bypass this warning, since you are changing the id´s via the widget designer, you have to first change the id´s to some that are not yet taken within your Pandoras Box project and then change them to the id´s you want.

For example:
You have a watched folder and the files are labeled 1,1 to 1,15.
Now you add 2 more files. They will show up in the project tree immediately but without ID.
With a custom script buttom use the following script to change the id´s to 1,1 to 1,17


Hope that helps,

Best regards


Re: IDs on watchfolder

PostPosted: Tue Jun 28, 2016 8:18 am
by malkuth23

I have long thought this should be an option within PB.
The code you wrote will re-number the existing IDs based on alphabetical order. It is the best way to do it, but it kind of sucks that this is the only way.
So now, if you are referencing any of those files in different places it is broken. If you are using them in a media control panel you have to re-download thumbs etc.

Shouldn't the File ID be related to the order in which it was added?
Add a new file and the watchfolder should assign it the next available File ID #.
This should be a checkbox option for watch folders.

If you have to create a Watch Folder node in WD and tie that into a Script output node, otherwise it is not automatic.
The watchfolder node mostly checks if the # of files in a path has changed and reports back the updated number of files. Tie this into a script output node that runs if > 0.

Re: IDs on watchfolder

PostPosted: Tue Jun 28, 2016 8:34 am
by matze
i agree that the ID must be automatically added to new clips in a watchfolder. your procedure is a nice workaround but quiet complicated because the next problem would be that i need a starting condition. so i need a feedback from pb that there is a new clip in the watchfolder anyway.

Re: IDs on watchfolder

PostPosted: Tue Jun 28, 2016 8:39 am
by malkuth23
No. There is a watchfolder Node. It is different than the PB watch folder.
It will tell you how many files exist in a path. Attach this to a script output node. Make the condition if file count > 0. Then it will update whenever the count changes.

But yes. Still complicated.

Re: IDs on watchfolder

PostPosted: Tue Jun 28, 2016 8:42 am
by matze