Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{path.parent} limited by --working-dir #427

Open
Zaldor opened this issue Dec 27, 2024 · 0 comments
Open

{path.parent} limited by --working-dir #427

Zaldor opened this issue Dec 27, 2024 · 0 comments
Labels

Comments

@Zaldor
Copy link

Zaldor commented Dec 27, 2024

I have a set up in which a custom Folder Context Menu runs a Batch File that execute organize with the selected folder as working directory; since the selected directory is a Project Folder that needs to be archived under a Parent "Client" Folder that may hold several projects, How do I get the parent of the working directory?

My simple Yaml:
rules:

  • name: "Archive Selected Project"
    locations:
    • "."
      filters:
    • lastmodified:
      days: 90
      mode: older
      actions:
    • echo: "Path: {path}"
    • echo: "Parent: {path.parent}"
    • move:
      dest: "D:/Works Archived/{path.name}"

Batch:
@echo off
organize run "C:/Users/zald/AppData/Local/organize/organize/ArchivePRJ.yaml" --working-dir="%~1"

PS D:\Works> organize sim "C:/Users/zald/AppData/Local/organize/organize/ArchivePRJ.yaml" --working-dir="D:\Works\Client\Project Number Two"

Is it possible?

@Zaldor Zaldor added the bug label Dec 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant