Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[SOLVED] Ideas for Duplicated Files

Featured Replies

Hi all, I'm looking for ideas/suggestions here:

I would like to be able to download a file into one folder, then have it automatically duplicate into two other folders. I would like for this process to be running continuously, and if possible notice the downloaded file rather quickly.

Download into Folder A -- insert process or suggestion here, that will notice this file here and then automatically duplicate the file to Folder B and to Folder C.

** If possible a huge preference would be to have the files hard-linked instead of copy. But not a requirement.

Thank you for any suggestions!

Edited by shelfactor

Solved by shelfactor

  • Author
  • Solution

For anyone coming to this thread from a search, I ended up using User Scripts + INOTIFY to watch the folder and hardlink to others. I have the script set to run at startup continuously.

#!/bin/bash

WATCH_DIR="[WATCH DIRECTORY]"
DEST1="[DESTINATION FOLDER1]"
DEST2="[DESTINATION FOLDER2]"

echo "Starting hardlink watcher..."
echo "Watching: $WATCH_DIR"

inotifywait -m -r -e close_write,moved_to --format '%w%f' "$WATCH_DIR" | while read FILE
do
    # Only process files (skip directories)
    [ -f "$FILE" ] || continue

    REL_PATH="${FILE#$WATCH_DIR/}"

    DEST1_PATH="$DEST1/$REL_PATH"
    DEST2_PATH="$DEST2/$REL_PATH"

    # Create destination directories if needed
    mkdir -p "$(dirname "$DEST1_PATH")"
    mkdir -p "$(dirname "$DEST2_PATH")"

    # Create hardlinks if they don’t already exist
    if [ ! -e "$DEST1_PATH" ]; then
        ln "$FILE" "$DEST1_PATH"
        echo "Linked to calibre: $REL_PATH"
    fi

    if [ ! -e "$DEST2_PATH" ]; then
        ln "$FILE" "$DEST2_PATH"
        echo "Linked to calibreweb: $REL_PATH"
    fi

done
  • shelfactor changed the title to [SOLVED] Ideas for Duplicated Files

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.