Rated 5 stars at SnapFiles
   Shareware and Freeware




   PayPal

 


Javascript is require for this site. (1328335128)

joejoe Feb-07-11 1:33 PM CST

Random Numbers

In this example, the user wanted to insert a random number at the beginning of the filename. Most of the time, usually this is just a work-around for really poor programs or devices that don't have a Shuffle function. Rarely, I've seen a few cases where this is to remove filename collisions.

While RM does not currently have a random number meta-variable, you can fake it with a quazi random number. By inserting just the seconds part of the time from a date, this is most likely close enough for most cases - except if you copy all the files to the computer at one time. You can, however, also use the lowest numbers form the size of the file to also make a seemingly random number since the least significant bits will be much more varied.

The following variables will insert the Date-Modified and Date-Created formatted as only second:

?dmo:Fss? ?dc:Fss?

The ?zn? meta-variable for file size can be inserted into the beginning of the filename. Using the Substring formatting option, you can show only the last three digits when the file is seven digits in length in the following example :

?zn:S4.7? - where only characters 4 through 7 will be shown

joejoe Sep-02-10 12:42 AM CDT

Moving parts of the filename

I've often been asked how to move parts of the filename. In this section, I'll describe the process, but leave out an actual example.

The way Rename Master (RM) performs moving parts of the filename is by using a cut-and-paste procedure, or more accurately, a remove-and-add procedure. RM has a special meta-variable called ?temp?. On most remove operations, there is and option to store the removed text in the ?temp? variable. By inserting an Add operation after the Remove, the ?temp? variable can now be place in the textbox for the text to be inserted.

While this operation isn't very intuitive, it's extremely flexible. Every possible combination of Remove and Add is available for moving strings around in the filename. For the most flexibility, I recommend using the Remove Expression Step (found in newer version of RM).

For an example, if you wished to rename a file named after the date in MMDDYYYY format to YYYYMMDD for sorting, you'd only need to remove the last 4 numbers from the end of the filename and Add the removed text to the beginning of the filename. The Remove Beginning/Ending Step and the Add to Beginning/Ending Step will perform this task easily.

joejoe Mar-09-10 10:07 PM CST

Insert the Month Name

In this example, the user wanted to insert the month name after the date in numeric format. Below is a list showing how the operation should work:

Before:
file1 20100131 sgelse.ext
file1 20100228 sgelse.ext
file1 20100331 sgelse.ext

After:
file1 20100131 Jan sgelse.ext
file1 20100228 Feb sgelse.ext
file1 20100331 Mar sgelse.ext


Since the date is formatted in YYYY MM DD format, the Add Before/After step can be used to do the operation using a single script with 12 steps [one step for each month name]. Starting with a blank Scripting tab, add the Add Before/After step 12 times and use the following settings for the first Step:

Add [ Jan] to the [Name]
place it [After] [201001??]

This will add a space and the word Jan to any file that contains 201001 followed by any two characters. Think of this as a Search and Insert operation. The ?? part stands for any 2 characters, so it will incorrectly turn [201001AB] into [201001AB Jan]. This isn't a perfect operation, but it will work most of the time.

The following settings be used for February:

Add [ Feb] to the [Name]
place it [After] [201002??]

The same format is used for March through December. Once all 12 steps have been set, this can be saved as a script file for future use. As said above, this isn't perfect, so it's important to scan the New Name column, make sure the results are as expected, and uncheck any files that should not be renamed before doing any renaming.






Got an idea for improving my freeware? Got a bug to report? Just want to say hello? Send me your feedback.
I can be contacted at jackass.joejoe@gmail.com or send me a comment below. English only please. If you want a reply, please use E-mail for feedback.


Name


(Leave blank)


Comment