organize
organize copied to clipboard
Copy a file only once
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?
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?
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