Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Rename Files Recursively Without Updating Date?

Featured Replies

Hi, I have a bunch of videos that I want to upload to Google Photos. They need to have their extensions changed, but I want to preserve the date/time of the files so they are indexed properly.

 

Is there a single command that I can run that will:

  • Recursively go through a directory and subdirectories and rename any file ending in '.foo' with '.bar'
  • Do NOT update the file date/time

 

I've done some research on this online and it appears there are several approaches to do one or the other, but I cannot determine the best way to combine the two. I am also a little gun-shy as a n00b and I really only have one shot at this, if I screw up the dates/times they're not recoverable.

 

Thanks in advance!

  • Community Expert

Since this is your first post here and you don't mention it, are you talking about doing this on Unraid? 

  • Author

Yes I am... I figured I'd start here although this is more of a generic FreeBSD question.

You would probably need to 'copy' the source file to the destination using the --preserve=all option followed by deleting the source file (move [mv] doesn't allow to preserve timestamps).

 

i.e.

cp --preserve=all [source] [destination]

rm [source]

 

I'm not big on making scripts so perhaps someone else can help with that, or you can attempt it yourself.  Might want to not remove anything until you are sure it works, or create a dummy directory and files to test on.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.