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

Copy a file only once #155

Open
hackmonker opened this issue Jan 10, 2022 · 2 comments
Open

Copy a file only once #155

hackmonker opened this issue Jan 10, 2022 · 2 comments

Comments

@hackmonker
Copy link

So my workflow needs me to copy any new file added to a folder to another folder. I setup the config in that way and use inotify to run the command everything is fine. only that when I add two files, the command copies the first file twice since the command is run twice. Is there a way so that when the command is run the second time, it only copies the new files and not the old files again?

@tfeldmann
Copy link
Owner

If I understand this correctly you need a mechanism to detect if the file has ever been handled by organize, right?
Most people just move the original file to a handled folder or rename it. Could you upload your config if I understood this wrong?

@hackmonker
Copy link
Author

hackmonker commented Mar 13, 2022

sorry for the late reply. I was having my exams. yes exactly. if organize ever handled a file then to skip it. I cant move or rename the files from my source since some other app looks at them. so I symlink from my source to a temp folder where I process them and then move them to another dest. I wanted to use organize for symlinking from source to temp whenever new files are added to source

rules:
  - name: "Move M4Bs to temp for further processing"
    locations:
      - /mnt/local/downloads/audiobooks/original
    subfolders: true
    filters:
      - extension: m4b
    actions:
      - symlink: "/mnt/local/downloads/audiobooks/temp"

  - name: "Move Mp4s to temp for further processing"
    locations:
      - /mnt/local/downloads/audiobooks/original
    subfolders: true
    filters:
      - extension: mp4
    actions:
      - symlink: /mnt/local/downloads/audiobooks/temp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants