contentXXL behaves a little like a diva concerning its resources. Files you didn't add through the resource manager but by placing them in the folder through windows or the portaldata manager can't be used for articles as they are won't get registered in the database.
However there might be times when you have just that - more files then there should be in one of you resource folders. Aside from not being able to use them in the contentXXL Resource manager, you'll experience some problems:
- at least up to version 3.70.2896 uploading a file through the resource manager when the same file already exists in the windows folder (but not in the database) will have no effect aside from the file being overwritten in your windows folder
contentXXL will not register the file in the database
This leaves you with the problem of having to manually delete all non-database-registered files from the file system before uploading them to contentXXL, which can be quite a pain when you have lots of files in your folder.
Attached sample script can help you with this task. To use it, just copy it the affected resource folder (portaldata/x/resource/...) and navigate to the file with your browser.
All files not properly registered in the folder will get moved to a subfolder "tmp", so you can either delete or zip them for uploading through the resource manager.
Ok, actually you could take this further and extend the script so not registered files will get registered automatically… Look for more on this soon.
Use at your own risk!