Ugly Hedgehog - Photography Forum
Home Active Topics Newest Pictures Search Login Register
Main Photography Discussion
Windows batch file for adding "1" to image numbers once they pass 9999 (ie. 10012)
Page <prev 2 of 3 next>
Jan 7, 2019 15:06:20   #
Longshadow Loc: Audubon, PA, United States
 
Dngallagher wrote:
Exactly why I rename all images on import into Lightroom. In my opinion, a naming system that rolls over at 9999 and starts again is really worthless. For me, renaming files with my initials plus the date and time taken assure me of never having a duplicate file, has worked out in over 60,000 files so far, and is transparent as it occurs on import from my SD card.

I rely on the date taken stamp in the file data, which I have as a display field (among other image data) in Windows Explorer for my photos directories. I was weened on 8 bit everything, so very few of my file names are long.

Reply
Jan 7, 2019 15:23:51   #
Longshadow Loc: Audubon, PA, United States
 
I appreciate all the advice and suggestions and it's interesting to see how others do things. I've been using my system for years and it works very well for me. I don't use a cataloger, and only Elements, DPP, and Photo Impact Pro. For searching, I can put words in the TAG field for the file, but I know where most things are located.
Worst thing I did was keeping RAW and JPEG separate. I fixed that real quick!

Reply
Jan 7, 2019 16:15:46   #
DirtFarmer Loc: Escaped from the NYC area, back to MA
 
Longshadow wrote:
...as I store images in a subject directory. I can view all of "SuziesBirthdayParty" in the directory, no need for me to rename each file...

I've been programming and using computers for over 45 years, I don't like duplicate file names with different contents.
Hope that explains some of my philosophy.


I took my first computer course about 1959, before I ever saw 8.3 style filenames (which I believe were introduced in the '80s). I put up with them for quite a while but I find longer filenames essential since you don't have to compress a (possibly non-unique) description into 8 characters. Most of my descriptions are less than 25 characters but the filenames get longer when I add the date and time (long filenames used to be limited to 256 characters but I don't know if that's still the case). The folder names are just descriptive.

I like having the individual files descriptively named as well as the folder. That allows me to copy the image file somewhere else and have the description in front of the viewer (which is not always me).

Since I use Downloader Pro, renaming files on import is a snap. I have only to (1) select the files on the camera card that I want renamed and (2) supply the descriptive text. DP then generates a folder named from the descriptive text and places all the renamed files into it. Downloader Pro cost me $30 about 10 years ago and it was really worth it. I expect there are similar programs out there now. Maybe even free(?)

PS: I keep the jpg files in a folder and the raw files in a subfolder from that, so they are basically separate but together.

PPS: We occasionally had fun with 8.3 filenames by editing the FAT table and inserting space characters or asterisks (or other interesting characters) into the filenames.

Reply
 
 
Jan 7, 2019 16:40:58   #
Longshadow Loc: Audubon, PA, United States
 
DirtFarmer wrote:
I took my first computer course about 1959, before I ever saw 8.3 style filenames (which I believe were introduced in the '80s). I put up with them for quite a while but I find longer filenames essential since you don't have to compress a (possibly non-unique) description into 8 characters. Most of my descriptions are less than 25 characters but the filenames get longer when I add the date and time (long filenames used to be limited to 256 characters but I don't know if that's still the case). The folder names are just descriptive.

I like having the individual files descriptively named as well as the folder. That allows me to copy the image file somewhere else and have the description in front of the viewer (which is not always me).

Since I use Downloader Pro, renaming files on import is a snap. I have only to (1) select the files on the camera card that I want renamed and (2) supply the descriptive text. DP then generates a folder named from the descriptive text and places all the renamed files into it. Downloader Pro cost me $30 about 10 years ago and it was really worth it. I expect there are similar programs out there now. Maybe even free(?)
I took my first computer course about 1959, before... (show quote)


You have about twelve years on me for the computers. I do use long filenames, but I don't make them verbose. Loved that capability when it was introduced. Most of my 8 bit filenames were kinda cryptic mnemonics.

I'm real old school, I like having control of my computer and what it does, which has been greatly reduced with each version of Windows. But I do like Windows compared to DOS for running multiple programs!

Ever think about how much computer knowledge in your head has leaked out???
A friend of mine just sent me an old script (for nostalgic purposes) for a PDP 11/44 we used.
One of the lines was SET /UIC=[1,1]
Wow, set user identification code... THAT leaked out! But I'll never use it again.

Reply
Jan 7, 2019 18:07:10   #
DirtFarmer Loc: Escaped from the NYC area, back to MA
 
Longshadow wrote:
...Ever think about how much computer knowledge in your head has leaked out???...


Most of it. But it's not really important what's leaked out because the field changes so rapidly that stuff from as little as 2 years ago is obsolete.

I try to keep active. A couple years ago I wrote a web application so I could keep track of my irrigation zones on my smartphone. Right now I'm trying to modify it so my wife can record some of the data she generates in her work and wind up as a PDF. Trying to learn stuff as I go so the code is probably horrific by the standards of people who do it for a living but I'm getting something that works.

Always good to be in danger of learning something new.

Reply
Jan 7, 2019 18:29:16   #
Longshadow Loc: Audubon, PA, United States
 
DirtFarmer wrote:
Most of it.

I try to keep active. A couple years ago I wrote a web application so I could keep track of my irrigation zones on my smartphone. Right now I'm trying to modify it so my wife can record some of the data she generates in her work. Trying to learn stuff as I go so the code is probably horrific by the standards of people who do it for a living but I'm getting something that works.

Always good to be in danger of learning something new.


Good to hear that!

My theory is Keep It Simple...
That's why I do my own HTML/PHP. Not super fancy but it gets the job done with little code.
Word, Word Press, Front Page all create so much verbose code.

Reply
Jan 7, 2019 18:44:19   #
DirtFarmer Loc: Escaped from the NYC area, back to MA
 
Longshadow wrote:
Good to hear that!

My theory is Keep It Simple...
That's why I do my own HTML/PHP. Not super fancy but it gets the job done with little code.
Word, Word Press, Front Page all create so much verbose code.


I got a copy of Dreamweaver many years ago. It still works and fills the bill. Much easier than when I wrote html on a text editor.

Reply
 
 
Jan 7, 2019 18:48:22   #
Longshadow Loc: Audubon, PA, United States
 
DirtFarmer wrote:
I got a copy of Dreamweaver many years ago. It still works and fills the bill. Much easier than when I wrote html on a text editor.


Quicker I'll bet!

Reply
Jan 7, 2019 18:51:55   #
Longshadow Loc: Audubon, PA, United States
 
DirtFarmer wrote:

....
....
PPS: We occasionally had fun with 8.3 filenames by editing the FAT table and inserting space characters or asterisks (or other interesting characters) into the filenames.


I think I still have HEXEDIT. Played with that a lot editing files!
Do much Assembly?

Reply
Jan 8, 2019 05:42:51   #
Shoeless_Photographer Loc: Lexington
 
I just use Canon's EOS Utility program to create a folder with that year, month, and day, then modify the filename to include those instead of the IMG_ part, and keep the xxx-xxxx part of the file name. The only thing I have to do is change it once a year to a new year, and create the yearly folder.



Longshadow wrote:
For those familiar with Windows Batch Commands, this works for my Canon files.
(Windows (7) shotgun rename apparently cannot insert a character.)

* place images in a individual working directory, like "Renumber".
* place the .cmd file in the same directory.
* in Windows explorer for the "renumber" directory, double click the .cmd file.

It will strip the "IMG_" from the .CR2 and .JPG files and show you what it did (directory listing) and pause.
Then it will add the prefix "IMG_1" to the .JPG and .CR2 files and show you what it did and pause.

You can probably modify it for another camera brand's naming convention. You, or someone, should be familiar with batch commands. You can modify the "1" to "2" when you go past 9999 the second time.
Use a text editor and save the command statements below as RenumberImages.cmd or whatever you want to call it. Yes, I could have put some checks in the file, but I don't need them.

CAVIAT(s):
- Only for those comfortable with batch files!
- Provided without warranty, use at own risk.
- I'm not responsible for any hiccups in what you do.
- Only run it against the files you need to add the "1" to.
- Run only ONCE!
- Test it in a temporary directory with COPIES of the images.
- If you are not sure about batch commands, check with someone who is familiar with them before using.
- Ignore this it if you are not sure....


REM Batch file to add 10,000 to image number once images pass 9999 (ie. 0012).
REM Place this file in a directory where the images are to be renamed, NOT your normal storage directory.
REM or place images in the directory where this file is located.
REM Changes Canon IMG_#### files to IMG_1#### (.CR2 and .JPG).
REM ONLY run it against new files from camera, ONCE.
REM After running, move the renamed files to where you want them.

REM Remove four character prefix to image number.
RENAME "IMG_*.*" "////*.*"
DIR
PAUSE

REM Add prefix back with a 1 for 10K to image number.
FOR %%a in (*.CR2) DO RENAME "%%a" "IMG_1%%a"
FOR %%a in (*.JPG) DO RENAME "%%a" "IMG_1%%a"
DIR
REM DONE
PAUSE
For those familiar with Windows Batch Commands, th... (show quote)

Reply
Jan 8, 2019 07:27:42   #
Longshadow Loc: Audubon, PA, United States
 
Whatever works for you.
I just use Windows Explorer to create a new directory and copy all files from the chip.
(Similar thing, different way.)

Reply
 
 
Jan 8, 2019 10:08:13   #
DirtFarmer Loc: Escaped from the NYC area, back to MA
 
Longshadow wrote:
I think I still have HEXEDIT. Played with that a lot editing files!
Do much Assembly?


Not much today, but in the '70s we had a Xerox minicomputer with 4K of RAM. For an additional $4K we got it up to 8K of RAM. I had an assembly program that fit into that which ran a scientific instrument, took the data, did preliminary analysis, and wrote the results on magnetic tape. (The program was on paper tape). ASR33 reader and "visual output". (We did have a fast paper tape punch).

Right now the closest thing I have is XVI32.com. I use it occasionally to look at files but don't do much editing with it. Had it bumping around for a while, so there may be a 64 bit equivalent now but haven't been interested enough to search for one.

Been retired for a while and the only programming I do now is in Pascal, C++, or PHP.

Reply
Jan 8, 2019 10:44:16   #
L-Fox
 
Google -- Lupas Rename

Lots of options, responds speedily.

Reply
Jan 8, 2019 11:02:40   #
Longshadow Loc: Audubon, PA, United States
 
DirtFarmer wrote:
Not much today, but in the '70s we had a Xerox minicomputer with 4K of RAM. For an additional $4K we got it up to 8K of RAM. I had an assembly program that fit into that which ran a scientific instrument, took the data, did preliminary analysis, and wrote the results on magnetic tape. (The program was on paper tape). ASR33 reader and "visual output". (We did have a fast paper tape punch).

Right now the closest thing I have is XVI32.com. I use it occasionally to look at files but don't do much editing with it. Had it bumping around for a while, so there may be a 64 bit equivalent now but haven't been interested enough to search for one.

Been retired for a while and the only programming I do now is in Pascal, C++, or PHP.
Not much today, but in the '70s we had a Xerox min... (show quote)


I never did Pascal or C++, but HAD ten other languages under my belt. Four were proprietary.
Most of of which has leaked out from lack of use.....
QB45 was the most fun at the time for manipulating information in files.
I did work on three systems that used paper tape.
Thanks for the nostalgia trip!
If it wasn't for HTML, PHP, and a wee bit of Java Script, I'd be an end user now!

Reply
Jan 9, 2019 00:09:04   #
jlocke Loc: Austin, TX
 
I use a utility program called Bulk Rename Utility. It's a free download, and gives you every option you would ever want in renaming a bunch of files. You can see how the rename is going to look before committing to the change. With photos, I use it to rename my files from DSC0001 to something like 2019-01-08_Hockey-001. It can do sequential numbering, so the rename is fast and easy. It can also work with EXIF data in renaming your photos.

https://www.bulkrenameutility.co.uk

Reply
Page <prev 2 of 3 next>
If you want to reply, then register here. Registration is free and your account is created instantly, so you can post right away.
Main Photography Discussion
UglyHedgehog.com - Forum
Copyright 2011-2024 Ugly Hedgehog, Inc.