Get File Date & Time

Any questions about the Command Line Interface can be placed 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:

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.
Posts: 32
Joined: Wed Jun 25, 2008 4:10 pm

Get File Date & Time

Postby martijn » Wed Nov 02, 2011 12:50 pm

I want to use the convert (imagemagick) tool to print date & time on images from my webcam. The webcam puts the images via ftp to my DS. There is no EXIF or IPTC info on these files, so I cannot use this function fom convert itself (I can use the exiftool to put some exif info in, but I want to use as less steps as possible)
Problem is that I cannot find a solution to get a file's creation or modification date. There are soltions on the internet with 'date' or 'stat' or 'ls' but those seem not to work on the DS. :?
I created the following bash command:

Code: Select all

echo "some datetime here" | convert *.jpg  -resize 640x480 -font fixed -pointsize 20 -fill blue -annotate +430+460 '@-' *_1.jpg

I hope that some one can help, the idea is that these jpg (one each 5 seconds) will be merged into a mpeg4 with ffmpeg.
All input is welcome!
remark: I can use the DS to pull the images from the camera, then I can use the systems date & time. I do not want this, because I want to use the camera's alarm-function for this.

Return to “Command Line Interface”

Who is online

Users browsing this forum: No registered users and 1 guest