diff --git a/Automatically-import-new-books-(Linux).md b/Automatically-import-new-books-(Linux).md index b90b58e..66889ba 100644 --- a/Automatically-import-new-books-(Linux).md +++ b/Automatically-import-new-books-(Linux).md @@ -58,10 +58,10 @@ add_to_calibre() { } # Monitor the folder for new files -inotifywait -m -e close_write,moved_to -e moved_to "$WATCH_FOLDER" | -while read -r directory events filename; do - echo "New file detected: $filename" - add_to_calibre "$filename" +inotifywait -m -r --format="%e %w%f" -e close_write -e moved_to "$WATCH_FOLDER" | +while read -r events filepath; do + echo "New file detected: $filepath" + add_to_calibre "$filepath" done ```