User Defined Script - Create Folder/Move files

Questions and mods regarding system management may go here
Forum rules
1) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form:

https://account.synology.com/support/su ... p?lang=enu



2) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model.
milty456
I'm New!
I'm New!
Posts: 3
Joined: Thu Jun 07, 2018 6:38 pm

User Defined Script - Create Folder/Move files

Unread post by milty456 » Thu Jun 07, 2018 6:43 pm

Looking to make sure of the task scheduler and a user defined script.

I'd like to create a folder with <Current date/time(hh:mm:ss)> then move all files with *.jpg from the current folder into the newly created folder with the current date and time.

Can someone help me with a script for this?

Here is the path I'm looking to organize with that script: find /volume1/Cameras/Float1/FI9821W_00626E55C21E/snap

Essentially my IP camera dumps all images into one folder; each night i'm looking to move all of the days images into a "dated" folder within that path.

Thanks

milty456
I'm New!
I'm New!
Posts: 3
Joined: Thu Jun 07, 2018 6:38 pm

Re: User Defined Script - Create Folder/Move files

Unread post by milty456 » Wed Jun 13, 2018 8:21 pm

Anyone? I can't believe nobody knows how to do this. Gotta be someone out there.

Thanks

milty456
I'm New!
I'm New!
Posts: 3
Joined: Thu Jun 07, 2018 6:38 pm

Re: User Defined Script - Create Folder/Move files

Unread post by milty456 » Thu Jun 21, 2018 1:34 pm

Weekly check in; anyone know how to do this?

User avatar
Twisted World
Seasoned
Seasoned
Posts: 544
Joined: Sun Jun 12, 2016 8:29 am
Location: Netherlands
Contact:

Re: User Defined Script - Create Folder/Move files

Unread post by Twisted World » Thu Jun 21, 2018 1:44 pm

Couldn't be to hard to figure out, but currently I don't really feel like digging into this. I can have a look in the weekend.

Meanwhile; if I understand correctly, you want to create some sort of daily "archive" of the images captured by your IP camera...
milty456 wrote:
Thu Jun 07, 2018 6:43 pm
...each night i'm looking to move all of the days images into a "dated" folder within that path...
If this is a "daily archive", then why would you want these folders to include the time, even with seconds precision?

Is this going to be a triggered script (for example when booting the NAS), a timed script (running at certain intervals) or something you want to run manually?
[ DS918+ | DS916+ | DS216+II | DS1815+ | DS115j | EDS14 | DS212+ | DS211+ | DS411slim ]

Post Reply

Return to “System Managment Mods”