Skip to content

directory upload #283

Open
Open

Description

@journeym

how can i upload all files in directory w/o recursrion (w/o subdirs)

Activity

  1. aleeessio commented on May 22, 2026

    @aleeessio

    Here's an example for directories with only files and not other subdirectories.. but of course you can extend it.

    #!/bin/bash
    
    DIR="${1-.}"
    USER="$2"
    
    if [ -z "$USER" ]; 
    then
    	echo "Bye!"
    	exit 1
    fi
    
    for f in "${DIR}"/*;
    do
    	telegram-upload --to "$USER" "$f";
    done

    When you have copied it in a file, such as upload.sh do

    sudo chmod +x upload.sh

    Usage:

    ./upload.sh <UPLOAD_DIR_PATH> <USERNAME_DEST>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions