1

I am using a tool called organize in order to sort folders with a lot of stuff in them and was wondering if it was possible to tell it to create, sort, or rename using ISO 8601 date format.

The config file goes like this:

rules:
    - folders: *private
      subfolders: true
      filters:
          - extension: pdf
          - created
      actions:
          - echo: "Found PDF!"
          - move: /run/media/[REDACTED]/Documents/unsorted_pdfs/{created.year}{created.month}{created.day}/

The folders it creates, are named like this: 201781; I, however, want them named like this: 20170801. Is this possible?

1

YAML itself has no standard date type. The syntax here is purely a organize thing. See the "Advanced Usage" in section in the README, where {created.month:02} results in 01 for January. So, presumably you need {created.month:02}{created.day:02}.

1
  • "Note the format syntax for {created.month} to make sure the month is prepended with a zero."... wow. I can't believe I missed that part. Thank you very much!
    – telometto
    May 15 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.