Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

0
Task script to move files by name
Post Flair (click to view more posts with a particular flair)
Post Body

Hello all

I am working on a synology DS224 i have created the task of deleting files and directories for the defined time period. I am just learning to write these scripts and have been searching for examples to try and learn from with no luck. i have a security camera system and all recordings go to directory by date and then a subdirectory by time and each recording is named by the camera name and time ex: Back room-01-060832-060858. i want a script that will move these files by name ex:"Back Room" from their original location to a folder named for the camera ex: "backlivingroom" i don't have a starting script to share as i can't find an example script to start with.

here is what i have started with

sudo command_to_run_as_root

#!/bin/sh

# Edit these variables

MYFILE="Back room"

GETFROM="/volume2/camera"

SAVEPATH="/volume2/camera/backlivingroom"

wget -q -O "$SAVEPATH" "$GETFROM/$MYFILE"

and the message i received

sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper

sudo: a password is required

/volume2/camera/backroom.sh: line 7: $'\r': command not found

Thank You for any help Brian

Author
Account Strength
80%
Account Age
7 years
Verified Email
Yes
Verified Flair
No
Total Karma
20
Link Karma
26
Comment Karma
n/a
Profile updated: 1 day ago
Posts updated: 1 month ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
10 months ago