Add timestamp of photos created by the “predictive capture” feature of Sony's Xperia camera app at the beginning of the filename

(setopt CSH_NULL_GLOB; cd /path/to/Camera\ Uploads; for i in DSCPDC_000*; do mv -v $i "$(echo $i | perl -lpe 's/(DSCPDC_[0-9]{4}_BURST)([0-9]{4})([0-9]{2})([0-9]{2})/$2-$3-$4 $1$2$3$4/')"; done)
The “predictive capture” feature of Sony's Xperia camera app hides the date stamp deeply inside the filename. This command adds another date stamp at the beginning of the filename.
Sample Output
'DSCPDC_0000_BURST20191215123205830.JPG' -> '2019-12-15 DSCPDC_0000_BURST20191215123205830.JPG'
'DSCPDC_0000_BURST20200119191047162.JPG' -> '2020-01-19 DSCPDC_0000_BURST20200119191047162.JPG'

0
By: langec
2020-04-12 06:20:59

What Others Think

I am a software engineer and I often go with such coding in my daily routine. But at times I get confused and I am not able to get through simple problems that require little attention and then I read reviews about edubirdie from youressayreviews.com source to get solution of my problems. Well, all thanks to you for guiding us with such ease. Well the coding is done accurately.
KurtisPowlowski · 19 weeks and 3 days ago
I am not sure if it works. I have been working on different APIs lately and found a few APIs that work with different devices. Haven't tried sitemap codes on the Xperia camera. Possibly because I do not use camera features much. I am a part of digital marketing services in US thus I can only work on the sitemaps that are related to apps and websites.
Timothyshaw · 16 weeks and 2 days ago
Implement directives issued by the state. Everyone joins hands to fight against epidemics, limiting moving out indoors to keep the living environment clean. fireboy and watergirl
pikachu88 · 15 weeks and 3 days ago
Thanks for the post. There are lots of good apps on the aptoide store. Everyone can access at https://apkrapido.com/aptoide/
delamada · 15 weeks and 1 day ago
Your post has been so helpful because it was clear and concise writing made it easy to understand. jiofi.local.html
malkovich · 8 weeks and 2 days ago
I'm impressed, I must say. Very rarely do I come across a blog thats both informative and entertaining, and let me tell you, you ve hit the nail on the head. Your blog is important.. Txtcartapp
ayesha · 6 weeks and 5 days ago
pleasant post, stay aware of this fascinating work. It truly regards realize that this subject is being secured likewise on this site so cheers for setting aside time to talk about this! Txtcartapp
ayesha · 6 weeks and 5 days ago
google
ryanmatt · 5 weeks and 2 days ago
CBD Dosage
charlly · 4 weeks ago
That's a lot of codes, I'm ignorant with those codes. I'm just a gamer and a streamer. You can watch my videos in Twitch and in YouTube. Usually I live stream my Counter Strike: Global Offensive, Diablo III, and Red Dead Redemption games. But for this month. I will play honkai impact third. I'm excited to play this game. I read some positive reviews and I can't wait to finally play it. https://chrome.google.com/webstore/detail/spades-plus/jonaaojmjfhpkepfnkfkdcfghogkgjcf
simplejack · 3 weeks and 2 days ago
This is what I've been looking for, really meaningful https://wordcounter.tools
chinachin · 1 week and 3 days ago
This is what I've been looking for, really meaningful word counter
chinachin · 1 week and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: