Is it possibly to somehow use the import script but for the asset name to be the original file name before it was converted with underscores?
[quote]Is it possibly to somehow use the import script but for the asset name to be the original file name before it was converted with underscores?
[right][post=“15816”]<{POST_SNAPBACK}>[/post][/right][/quote]
Matrix will not retain spaces in a file name. You can change the character used for the replacement on the Global Configuration screen, though.
I don't mind it being in the file name. I just don't want all the underscores in the Asset name. So when i do an asset listing of files it can look a bit better, and I don't run into problems with long file names going off the side of the page as it sees it as one word and will not wrap it.
[quote]I don’t mind it being in the file name. I just don’t want all the underscores in the Asset name. So when i do an asset listing of files it can look a bit better, and I don’t run into problems with long file names going off the side of the page as it sees it as one word and will not wrap it.
[right][post=“15819”]<{POST_SNAPBACK}>[/post][/right][/quote]
The Bulk File Import Tool in the Admin Interface allows you to do this, i.e. specify the Title attribute when importing multiple files. The import script doesn’t (currently) support this behaviour.
Where can I find this Bulk File Import Tool I am running 3.10 is it available for this version?
[quote]Where can I find this Bulk File Import Tool I am running 3.10 is it available for this version?
[right][post=“15821”]<{POST_SNAPBACK}>[/post][/right][/quote]
The Bulk File Import Tool is part of the Import Tools package. It is only available from v3.12 or higher. When you request an upgrade tarball from Squiz Support, please ask for the Import Tools package to be included as well.
Thanks, I managed to modify the import script myself by adding the following code after line 96
$filename_title = str_replace('.' . get_file_type($filename), "", trim($filename)); $new_file->setAttrValue('title', $filename_title);
That sets the title to the file name without underscores and also gets rid of the file extension in the title. The actual file is renamed with the underscores as normal.
That'd do it too. Glad you sorted it out.
I posted this several months ago as a feature request for bulk file imports!!!! (#2214)
anyways how do I modify this script (ie where is it and how can I change it) or do I need to root access to the matrix installation to change this???
This script requires root access to the Matrix installation. The Bulk File Import tool has not been modified. If you want this feature request to be developed, you should speak to your Account Manager about getting a quote for the development and funding it yourself.
how long would it take to paste this code into the script after line 96? if that's all that is required???
$filename_title = str_replace('.' . get_file_type($filename), "", trim($filename));
$new_file->setAttrValue('title', $filename_title);
We would not add those lines in. We would add an optional command to the script so users can choose to use it the existing way or the new way. We cant just change default behaviour.
If you want to add those lines in, you can add them yourself if you have access. If you want/need Squiz to do it for you, you can submit a support request to have it done. If you want it added as a generic feature so it remains in Matrix, you can fund that development.