Overview

Thank you for using this application, please take a moment to read bellow information.

Renamed and moved files using this application cannot be rolled back!

The application was made to rename pictures and clips using creation time if are available. The application was designed to run on Sony devices which default camera application save files using a prefix followed by a numeric counter, the pictures prefix is DSC_ and clips prefix is MOV_, the counter is reset each time when the folder where are saved files is cleanup.

e.g. DSC_0034.JPG and MOV_0045.MP4

That's why is important to check, if your device is not a Sony device, what are the file name pattern, mostly (Samsung, LG etc.) use IMG_ for pictures and VID_ for clips, the file patterns are on the Define file name patterns section.

Auto rename service trigger

On early Android version the most common way to detect when a new picture and clips was taken was to "listen" some camera events, but that depend by the developers which developed the camera application, because of that I let the user to check other options, but if nothing is not working the rename service can manually be invoked.

Available options are:

  1. Camera events. This trigger listen for camera events when pictures or videos taken. This option was removed from versions newest than Android Lollipop (5.x)
  2. Media content observer. Normally the Android OS store into an internal data base all pictures and videos information, like an indexer.
  3. File observer. This option will scan all selected folders and subfolders to register listeners for new files. You must check Rename within a folder and have a least one folder on Select a folder.
  4. A permanent running service used to catch camera application notification events. This option was removed from versions newest than Android Lollipop (5.x)

Regarding media content observer and file observer, on developing process I noticed that the delay between the moment of trigger and the moment when the Android OS invoke registered observer to launch the rename service can take more than 5 minutes.

Sometime I noticed that the service trigger must be registered again, by disable it and then selecting back.

That's why I do not consider any of available trigger reliable because of that I suggest to create on the Home Screen a shortcut to launch manually the rename service directly when is necessary or as a backup. More details on DSC Rename service shortcut section.

Enable video file rename

The option offer the possibility to rename the video files too.

Rename service start delay

This option it is used only when the rename service is automatically invoked. The rename service can be delayed to let the phone to settle down. The value is ignored when the rename service is manually invoked.

Rename within a folder

If this option is enable will let you to select which folder should be scanned for files to be renamed, by default the application will scan for all files from the device, by enabling this and set a list of folders, will limit the rename service to check only selected folders. This option is mandatory for newest Android OS, starting with Android Lolipop (5.x), see more info on next section.

Select a folder

As I mentioned above on this section are all selected folders used by the application to check for files which should be renamed. This option is mandatory for newest Android OS version, newest than Android Lollipop (5.x).

Normally the default camera application on Sony devices saves files on a subfolder named 100ANDRO, but I suggest to select the parent folder, DCIM. If you select this folder all subfolders will be available too.

An example of selected folders:

  1. /storage/F8E8-12B3/DCIM
  2. /storage/emulator/0/DCIM

The path "/storage/F8E8-12B3/DCIM" is normally a path to a DCIM folder located on the SD Card. The second path is the full path DCIM folder located on phone internal memory.

Sometime the Android OS rejects application right over DCIM folders from SD Cards, mostly when the SD Card is changed or an error is detected by OS, that's why is necessary to reselect the DCIM folder form the SD card if you notice that the files from SD Card are not renamed. Use manually rename option to check if the files are renamed properly.

Enable folder scanning for files

This option is deprecated and in most of the time will not be necessary to be used. This option will set the application to scan for files by scanning paths (folders and subfolders) instead to check the Android OS indexer (data base). If is enabled this option the application will consume more resources (CPU and RAM) to search trough selected folders for files, the process time will be increased too.

Define files name patterns

As I mentioned, because the application was designed to work on Sony devices, by default are two predefined patterns:

  1. Pictures: DSC_*.JPG
  2. Clips: MOV_*.MP4

The rename file name pattern by default contains some date time patterns like: "yyyyMMdd_HHmmss" where each letter case is important:

  1. yyyy - this is the year number using 4 digits, e.g. 2017;
  2. MM - this is the month number, using 2 digits, e.g. 07, it is important to be in UPPER CASE, otherwise will be interpreted as minutes;
  3. dd - this is the day in month number, using 2 digits, e.g. 31;
  4. _ this character is used as it is, as a separator;
  5. HH - this is the day in hour representation, in 2 digits, from 00 to 23, it is important to be used UPPER CASE, otherwise will be interpreted in interval 00 - 12 (AM/PM version);
  6. mm - this is used for minutes, using 2 digits, must be used lower case letters;
  7. ss - this is used for seconds, also the case is important, should be used lower case letters.

See more format information on: Java SimpleDateFormat class page.

Notes:

  1. As can be noticed from the Java class the date time format is more flexible but it is important to respect letter case and repetition. For example the MM will return a number between 01 and 12 but if you use 3 of M, like MMM will obtain first three letterns from the month name, like: Jul, or MMMM will return the full month name: July
  2. Unfortunately the milliseconds cannot be used (S upper case), the file date time info or EXIF data do not offer milliseconds support. See Date and time (original) Tag from the EXIF documentation.

The file name extension it is preserved during rename process, also is case insensitive, JPG = jPg = jpg

Define file name extra suffix

By default the application will add a counter suffix to offer an unique file name, this is necessary when more than one picture is taken on the same second.

Pattern explanation:

  1. _ This character it is used as a separator like on the rename pattern;
  2. %05d Define the numeric pattern used to add the numeric value, "d" mean digits, "0" mean preceded by zeros, "5" mean 5 digits number, e.g. 00003

Rename file using:

Using this option the user can define which information will be used to obtain the date and time in rename process.

Available options:

  1. date and time when the file was adde to the media provider, this is actually the date and time from the internal Android OS indexer (data base).
  2. date and time when the file was last time modified. The Java and Android implicit do not offer information when the file was created, this is a well know issue. See File class documentation for more details.
  3. EXIF or Metadata if available, otherwise will be used the date and time when the file was last time modified.

Append original name

Because the application is not implemented to rollback renamed files, using this option can be saved the original file name.

The rollback rename file was not implemented because the original Camera application will reuse the counter so it will mess the file order.

DSC Rename service shortcut

Because the automatically trigger is not reliable, I must admit that, and because I did not identified a way to make it to work always, I suggest to create on your Home screen a shortcut to launch manually directly the rename service.

Even my self I use the shortcut to rename files after each photo session. This could be helpfully because the rename process will not affect the camera processes.

Hide confirmation dialog

Using this option the user can disable the confirmation dialog used prior starting the manually rename service when the shortcut it is used to launch it.

Start manually the rename service

This option allow the user to launch manually the rename service from the main application, mostly this can be used to check if settings are properly set.

Number of renamed files

Here are shown a counter with renamed files number. If it is touched the counter can be reset.

Export and import settings

Using these options can be exported and imported application settings to and from a local folder. The file name is dsc_autorename.preferences. The file is actually a text file.

On importing process the paths may not be included if the application do not have access rights. That's why you should check and select again folders if is necessary.

Send debbuging logs

Use this option to send some debugging information related with this application to me, it is important that the mail to contain an archive attached and a description with the issues in English or Romanian language.

The logs will contain the mount paths to identify which partitions are available on your device and most important the content of MediaStore.Images and MediaStore.Video databases which contain meta data for all available images and clips, mostly to identify what are the file names patterns.

Donate

You can make a donation if you appreciate the application by installing the Pro version, which actually act like a key, it is not an application.

The donation is not required, the application is fully working in free version too.

Application sources

This application is an open source application and have sources published at the addrress: https://github.com/ciubex/dscautorename

Translations and suggestions

Any translation and language suggestion is welcomed, you can use online page: Weblate: DSC Auto Rename for translations or send emails with any language suggestions.

This help page source is available online at the address: help-en.html.

User feedback

I appreciate any Google Play feedback, but to be honest if you have issues I prefer to contact me directly using the "Send debbuging logs" option using this option I will be aware about any issues, to find possible solutions or workarounds.