Jump to content
HonestOpinion

NUMBERED PREFIX SCRIPT AND UTILITIES TO HELP WITH IR BACKUPS

Recommended Posts

This script is to help make backing up and restoring IRs to the same slot a little easier. For anyone looking for a quick way to add an incremented prefix number to all their IRs. Still an imperfect solution for IR backups but I hope this helps.

I wrote a DOS script inspired by some suggestions on the web for adding an incremented numbered prefix to all of your IRs at once. I considered doing it in PowerShell but I thought more people might be comfortable with a DOS script. It can be run from a Windows directory or any Command window (DOS prompt) As of right now numbered prefixes are the only way I know of to be able to dependably restore IRs after a firmware update and global restore in the same order so that your presets don't point to the wrong IR.

I pasted the script here so you can create your own batch file rather than uploading code which always has the possibility of a virus. Cut and paste from this post and just name the file something like IncrementedPrefixIR.bat and run it from the command prompt on a Windows computer. My apologies to Mac users, I am not a Mac person but I am sure it could easily be adapted by someone who is, or run from a Mac DOS emulator. The script is totally non-destructive, only does a copy, and seems to work perfectly but I make no guarantees implied or otherwise. The safest way to test this script will be to copy your IRs and the script to a new directory and run it from there. If anyone has any issues please let me know and I will attempt to fix them. Thanks!

Instructions for .bat file use

  • Cut and paste the script into Notepad and save and name the script, e.g IncrementedPrefixIR.bat Make sure you have a .bat extension for the file name.
  • Place it in the directory with your IR files. It will only copy IRs (*.wav) files
  • You can run the script by double-clicking it or using "Open" on the .bat file from the Windows directory, or, alternatively you can open a dos/command prompt and navigate to your IR directory with the script. Then type .\ IncrementedPrefixIR.bat
  • All IRs in the directory will be copied with a prefixed incremented number and underscore. For example, the files "MarshallGreenback.wav" and "MesaBlackWidow.wav" will now have copies named "1_MarshallGreenback.wav" and "2_MesaBlackWidow.wav". You may need to refresh your directory to see the new files. If you run the script twice you will end up with two sets of copies.
  • You can now either move your prefixed copies to a new directory or delete the old files without prefixes (make sure you have a backup of them somewhere else first).
  • You can now order the Windows directory on name and all your IRs can be imported into the Helix in the same order every time.
  • Please feel free to enhance the script, I can think of a couple of ways it could be better.

The .bat file script (cut and paste everything from "@echo off" down to the "GOTO :eof" line into a .bat file)

@echo off
SET COUNT=1
REM

FOR /f "tokens=*" %%G IN ('dir /b .\*.wav') DO (call :renum "%%G")
GOTO :eof

:renum
copy %1 %count%_%1
set /a count+=1
GOTO :eof

Share this post


Link to post
Share on other sites

Mac users can use this essential utility ($20, but ya gotta have it ... it comes in handy for all sorts of stuff):

 

http://www.publicspace.net/ABetterFinderRename/

 

Nice utility! Or you can use squish & Python to convert or just rewrite the script in Bash or some other shell script. This is a pretty good site on converting from DOS to Shell script.

 

http://www.macs.hw.ac.uk/~hwloidl/docs/abs-guide/dosbatch.html

Share this post


Link to post
Share on other sites

Mac users can use this essential utility ($20, but ya gotta have it ... it comes in handy for all sorts of stuff):

 

http://www.publicspace.net/ABetterFinderRename/

 

Or use Automator, its there on every mac.

 

Attached is a zip file with an Automator script packaged as an app to rename the files, put it on your desktop.

 

Then in finder select the files you want to rename (you may want to back them up somewhere just incase) now drag and drop them onto the app and it will rename them.

 

Also a screen dump of how to set up automator to do this if you don't want to use the app.

AddSequence.app.zip

post-12882-0-18228300-1460790701_thumb.png

  • Upvote 1

Share this post


Link to post
Share on other sites

Bulk Rename Utility:
A big thank you to "Rushian" for this tip.

Download freeware:

Bulk Rename Utility

How to use it:

1.I copied all my Ownhammer 44.1 wav files to there own folder
2.select that folder in BRU (Bulk Rename Utility)(see Screenshot)
3.In section "Numbering (10)" change "mode" to "prefix" and "start" to 001 (or what ever you need)
"Pad" to 3 "incr." to 1 and "sep." select box and hit your spacebar once
4.In Section "New Location (13)" Click on the box with the "..." in it and navagate to your Epsi SD card Folder "EPDA" and check box "Copy not Move"
5.Click the "Rename" Button and it's done!!!

BRU.png

 

I made this for the EPSI IR Loader so just disregard the sd card part

  • Upvote 1

Share this post


Link to post
Share on other sites

This is what I use too. Great tool.

 

Was about to post the link myself ;)

Great resource thanks! My thanks to everyone for posting these great utility links. I have renamed the topic in honor of the other resources posted here. Starting to be sorry I spent the time to write a script but at least it has surfaced some excellent alternatives to going through IRs renaming them one at a time.

Share this post


Link to post
Share on other sites

Ou use Automator, its there on every mac.

 

Attached is a zip file with an Automator script packaged as an app to rename the files, put it on your desktop.

 

Then in finder select the files you want to rename (you may want to back them up somewhere just incase) now drag and drop them onto the app and it will rename them.

 

Also a screen dump of how to set up automator to do this if you don't want to use the app.

 

Ou use Automator, its there on every mac.

 

Attached is a zip file with an Automator script packaged as an app to rename the files, put it on your desktop.

 

Then in finder select the files you want to rename (you may want to back them up somewhere just incase) now drag and drop them onto the app and it will rename them.

 

Also a screen dump of how to set up automator to do this if you don't want to use the app.

I was going to say that. 

 

Automator will do that for you on your Mac for free. 

 

Great idea. 

Share this post


Link to post
Share on other sites

Great resource thanks!  Starting to be sorry I spent the time to write a script but at least it has surfaced some excellent alternatives to going through IRs renaming them one at a time.

I did post the info before but as you know on a forum things get pushed past the 1st page and are forgotten.... I think its great that you are able to write script and it may help someone in the future to use it for something else.

  • Upvote 1

Share this post


Link to post
Share on other sites

I did post the info before but as you know on a forum things get pushed past the 1st page and are forgotten.... I think its great that you are able to write script and it may help someone in the future to use it for something else.

 

Thanks!

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...