tfeldmann/organize

Original Name Variable Issue in Move and Rename Operation

iburunat opened this issue · 3 comments

Describe the bug
I'm trying to include the original name of the file in the destination path during the move and rename operation, but the current variable {name} doesn't seem to provide the expected result. Which variable should I use here for the file original name if my goal is to move/rename file from ORIGINALNAME.ext to yy-mm-dd_hh:mm:ss_ORIGINALNAME.ext. I get the error:

- (move) ERROR! Missing value for template: 'name' is undefined. Maybe you forgot a filter?

Environment (please complete the following information):

  • OS: MacOS 14.3.1
  • Output of organize --version: organize v3.2.1

Your config file

  - name: "album"
    locations:
      - path: '~/Pictures/album/_TEMP/'
        exclude_files: ['*Screenshot*.*', '*screenshot*.*']
    subfolders: false
    enabled: true
    filters:
      - created
      - extension:
          - jpg
          - png
          - jpeg
          - heic
    actions:
      - move: # and rename
          dest: "~/Pictures/album/{created.strftime('%Y-%m-%d')}/{created.strftime('%Y-%m-%d_%H:%M:%S')}_{name}.{extension.lower()}"
          on_conflict: rename_new
          rename_template: "{name}_{counter}{extension}"

Thanks a bunch!

I haven't tried it yet, but it seems like you are missing the name filter:

    filters:
      - name
      - created
      - extension:
          - jpg
          - png
          - jpeg
          - heic

Can you try that?

Thanks! It worked. This is my own oversight, apologies and thanks again!

No problem!