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

Run only if files have been modified #50

Open
kosli opened this issue Jan 20, 2017 · 0 comments
Open

Run only if files have been modified #50

kosli opened this issue Jan 20, 2017 · 0 comments

Comments

@kosli
Copy link

kosli commented Jan 20, 2017

As i am running the script in a cron hourly job and the directory has 30k files, it takes a while. I made a simple solution for my bash wrapper script:

  • create a timestamp file right before starting flac2mp3
  • use find -newer on each run to check if any files have been modified since the last run.

Another option would be to let flac2mp3 work with timestamps:

  • set the modified time on the files in the target directory to the same time as the source file
  • only do any work on a file if the timestamps from source and target are different (checked file by file)

So if somebody runs into the same "problem" ....or if you would like to give the code some work ;-)

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

No branches or pull requests

1 participant