Rename Documents

Questions, comments, discussions. Over time certain topics might be moved to their own category.
shs
Posts: 2
Joined: Sun Jan 26, 2020 10:25 am

Rename Documents

Post by shs »

Hi,

how can I rename documents after uploading?

User avatar
rosarior
Developer
Developer
Posts: 522
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: Rename Documents

Post by rosarior »

Hi,

from the "Actions" menu, select "Edit properties" and this take you to a form where the label, description and language of the document can be edited.
Attachments
2020-01-26_06-57.png
2020-01-26_06-57.png (78.52 KiB) Viewed 3563 times

shs
Posts: 2
Joined: Sun Jan 26, 2020 10:25 am

Re: Rename Documents

Post by shs »

Thank You!
I did not consider that the action menu changes depending on which item is selected.

BayerSe
Posts: 3
Joined: Sun Jan 26, 2020 7:03 pm

Re: Rename Documents

Post by BayerSe »

Hi,

is it possible to do this at the upload step?
I'm currently renaming each file using the process describe above which is taking quite some time.

Or do you all simply leave the label as is? In my case this would be the name generated by my scanner such as SCAN_YYYYMMDD_HHMMSS.pdf.

Regards
Sebastian

User avatar
rssfed23
Moderator
Moderator
Posts: 213
Joined: Mon Oct 14, 2019 1:18 pm
Location: United Kingdom
Contact:

Re: Rename Documents

Post by rssfed23 »

It's not possible to change it at the staging stage, no (due to limitations of the Django upload wizard the platform uses).

I can only speak for myself of course, but leaving the label as is should be fine for most purposes as long as you've got other labels/cabinets/metadata/smart links set up for organisation.
There is of course also the smart naming feature for a specific document type, but that will do similar to what your scanner does ("your name 001", "your name 002" etc).

It really is a personal preference how you name or structure the organisation of your Mayan environment. I do recommend you have a read of viewtopic.php?f=15&t=1599 - it walks through the various organisation structures and gives some recommendations. Come to think of it, it doesn't mention document title once as you can quite comfortably get by without ever worrying about them.

Another way you could ease the renaming is to use a workflow. I've not tried this yet, but I *think* you can set one up to present a field and then as you click through it rename the file based on what you put in the field or automatically rename documents based on their metadata.
Then you could in theory do them in batch. But there is a bit of a learning curve involved in workflows (there's another post in the guides section for that also)
Please bear with us during the current global situation. The team all have families and local communities to look after as well as the community here. Responses may be delayed during this time, but rest assured we will get to your query eventually.

BayerSe
Posts: 3
Joined: Sun Jan 26, 2020 7:03 pm

Re: Rename Documents

Post by BayerSe »

Dear Rob,

many thanks for your detailed answer! It's somewhat a pity that changing the name at upload is not possible.

I realize that in most cases the label (filename) is not required and can be replaced by clever sets of metadata as is nice outlined in the linked thread - many thanks for that!

In some cases, however, I think names could be useful, e.g. for official documents (or any document type of which you don't have many documents). On the other hand, for these rare cases I can also do the renaming with the additional steps described above.

The workflow approach sounds interesting but I'm not quite there yet.

Many thanks
Sebastian

BlackGuardian_AR
Posts: 4
Joined: Tue Mar 03, 2020 2:38 pm

Re: Rename Documents

Post by BlackGuardian_AR »

Hello! I am matias from Argentina.
I'm using google translator. Sorry if there is an error in the translation

I was able to partially resolve the issue of file renaming by using metadata and workflows

Im using a Workflow with 2 States and 2 recurrent transitions. When i upload a file or change metada info, the transitions triggers an execute a "Modify document Properties" action. Then in LABEL, i Put the following code:

SAMSv1_{{ document.document_type }}_{{ document.metadata_value_of.sistema }}_{{ document.metadata_value_of.nombre }}_{{ document.metadata_value_of.iddoc }}_{{ document.metadata_value_of.año }}



(This is a personal example, if you want to implement you must surely modify it to your needs)

But I have a problem. I need to keep the extension of the original file and Mayan does not allow me to do it, because when I rename I have no way to keep the original extension
It occurs to me that capturing the extension and passing it into a metadata and then being able to use it when renaming the file could be an option ... But Mayan also does not allow ACTION of a state to write metadata.

Any suggestions?

Thank you!

gtrot
Posts: 13
Joined: Tue Oct 01, 2019 9:03 pm

Re: Rename Documents

Post by gtrot »

You can use, in the workflow :

Code: Select all

{{ document.label|slice:"-3:" }}
It will take the file extension from the document uploaded.

Guillaume Trottier

BlackGuardian_AR
Posts: 4
Joined: Tue Mar 03, 2020 2:38 pm

Re: Rename Documents

Post by BlackGuardian_AR »

Thanks!

I will try it!!!

BlackGuardian_AR
Posts: 4
Joined: Tue Mar 03, 2020 2:38 pm

Re: Rename Documents

Post by BlackGuardian_AR »

Thanks!!

It is Working!!!!

Post Reply