royfellows
17 years ago
Hi Gang
I have just wrote some scripting in Microsoft Visual Basic for Applications.
My camera produces image files named DSCF and then a number starting from 0001.
This is an utter pain if I say take 50 pictures in Rampgill and want to rename them Rampgill1 to Rampgill50
Basically, I upload the pictures to any old folder, My Pictures would do, and then running my application allows me to type in a new file name such as "Rampgill" and destination folder.
It presents me with a standard Windows Browse dialog box to browse to the folder with the pictures in it; I click on any file to start it running. It then automatically copies all the files with the new name to the destination folder and with the number reduced to a proper Integer, so 001 becomes simply 1.
DSCF0001 becomes Rampgill1 and so on.
I have put this code in a an Access application, but could put it into a Visual Basic project file and compile it into a redistributable executable, "rename.exe", if there would be a drink in it for me.
How do you people get on with other cameras, mine is a Fujifilm S9500. I mean can you set your file names to anything you want? All I can do with mine is zero the numbers, but still stuck with DSCF whatever that is supposed to stand for.
Any interest in Roy’s program?

My avatar is a poor likeness.
Barney
  • Barney
  • 50.2% (Neutral)
  • Newbie
17 years ago
"royfellows" wrote:


How do you people get on with other cameras, mine is a Fujifilm S9500. I mean can you set your file names to anything you want?



Unless i have totally misunderstood your question Roy, all i do is when my camera is connected to my PC, a box appears asking what i would like to call the folder. I type in for example 'Cwmorthin' the camera then uploads my pictures and names each pic as 'Cwmorthin 1' through to however many there is.
I have Windows Vista.
sparty_lea
17 years ago
Hi Roy
My Canon software is more civilised, it prompts me for a folder name and then names everything it downloads with the foldername and a number... pretty much as you would want it to do. 🙂
Sparty

There are 10 types of people in the world.

Those that understand binary and those that do not!
royfellows
17 years ago
Thanks both for the input.
It seems that I should have bought a decent camera, ouch!
As for Vista, I have a machine running that but do all of my work on an XP machine for reasons that would take a long while to go into.
I will try my Vista machine, but it may be down to the software that comes with the camera.
Thanks for the input.
My avatar is a poor likeness.
Clunk
  • Clunk
  • 50.2% (Neutral)
  • Newbie
17 years ago
Windows renames files and appends.
I press crl+a to select all pics. Rightclick > Rename. Type in the new name (I usually use dates) E.G. 25-06-2008.jpg press enter and the files are renamed and appended with numbers so I end up with:
25-06-2008.jpg
25-06-2008(1).jpg
25-06-2008(2).jpg
25-06-2008(3).jpg
25-06-2008(4).jpg
Etc.
royfellows
17 years ago
"Clunk" wrote:

Windows renames files and appends.
I press crl+a to select all pics. Rightclick > Rename. Type in the new name (I usually use dates) E.G. 25-06-2008.jpg press enter and the files are renamed and appended with numbers so I end up with:
25-06-2008.jpg
25-06-2008(1).jpg
25-06-2008(2).jpg
25-06-2008(3).jpg
25-06-2008(4).jpg
Etc.



Yes, obviously standard Windows functionality, however the numbers are parenthesised. Dupilcate filenames illegal.
Thanks anyway.

Edit: Afterthought. Be careful, it might not be an issue but some of the numbers may transpose from the original numbers
My avatar is a poor likeness.
Clunk
  • Clunk
  • 50.2% (Neutral)
  • Newbie
17 years ago
Does what you program does, but in a simpler way.
royfellows
17 years ago
Actually, to tell you the truth, I did it as part of a more serious project, and the parenthesised numbers would be no good.
Simon L knows what I am doing, so its no secret except that if I fail I will look a right chump after telling everyone about it.

Edit: I had better add for the benefit of Barney, Helen etc, my requirements are that I cant have spaces either.
My avatar is a poor likeness.
Clunk
  • Clunk
  • 50.2% (Neutral)
  • Newbie
17 years ago
Ahh, the greater good.
It is just my cynical mind.
If there is a feature already installed that can do the job, then I don't bother installing others.
Windows movie maker is a fine example. It works, is easy to use, so why use anything else?
royfellows
17 years ago
I was just trying to sound out what other people’s cameras and associated software would do and wondering if what I wrote, actually in about 20 minutes using Microsoft Runtime Scripting (method of the file system object) would be any use to anyone.
I am not going to say what I am going to (attempt) to do but the file names need to be exact match to concatenated hyperlinks that will open them from a database. Hence the need to avoid spaces and characters that could be illegal.
I am still interested in hearing people’s ideas though, one learns from others.
Thanks to everyone who has posted anyway.


My avatar is a poor likeness.
Mr Mike
17 years ago
I found a bit of shareware that does renaming in a very good way, you can do the normal things, plus select certain parts of a name and just have those changed, eg, Name_1.jpg. tell it to look for _1 and then replace that with _tn etc..

http://www.replsoft.com/ 

http://www.batchimage.com/download/ 
Mr Mike www.mineexplorer.org.uk
Roy Morton
17 years ago
Hi Roy,
Cant you do the auto trick and then use the find/replace to remove the parentheses?
Not being a PC Techno, I dont know if this would work or not.



"You Chinese think of everything!"
"But I''m not Chinese!"
"Then you must have forgotten something!"
Wormster
17 years ago
Roy,

like you I have a Fugi camera, what I tend to do is just create a new folder then cut and paste my photos across from the camera.

I does mean that I get a folder entiled I dunno "Cwmorthin 12 July 2008" (all I use is Location and Date) and within that the pictures all have the DSCF......file name.

I can understand where you are comming from in terms of wanting to rename each picture within the folder, however I'm of no use as a programmer, so I wish you all the best with your task.
(oh yeah IF it works can I have a cheeky copy as well??)


Better to regret something you have done - than to regret something you have not done.
royfellows
17 years ago
Thanks everyone for the input but my software was designed for a specific task, the method will work from a user dialog box which will need to batch handle up to 1200 pictures at a time by first creating a new root folder and then copying all of the pictures into it with new file names. The finished image library will run to an estimated 40 gigabytes.

I have however modified my original code so that the underscore character is used as a separator between the characters and the file number. This so as to make it more easily readable, as I have said before, spaces cannot be used.

Omitting spaces is part of what is called “Established best practice procedure” in programming and development, and in this case will be necessary anyway. The file names will be part of concatenated hyperlinks, and although obviously legal on a local machine will not be in the event that the hyperlink contains a Uniform Resource Locator (URL), in normal person speak, an Internet address.

I am unable to say what I am doing at this point, but "watch this space'. Sorry to be mysterious but if it does not work out and I start ringing the bell before I have achieved my objective, I am going to look a right burke.

RF
My avatar is a poor likeness.
Wormster
17 years ago
"royfellows" wrote:



I am unable to say what I am doing at this point, but "watch this space'. Sorry to be mysterious but if it does not work out and I start ringing the bell before I have achieved my objective, I am going to look a right burke.

RF



Roy,

Its better to say nowt 😮

If you are sucessful then well done, if not nothing ventures nothing gained.
Better to regret something you have done - than to regret something you have not done.
mountainpenguin
17 years ago
install cygwin learn a little bit of awk and bash.

royfellows
17 years ago
Thanks Adrian, but this thread has gone off at a tangent.
My method is integral to a more major piece of software, purpose of which is to be revealed later.
I originally offered this file copy method to anyone who wanted it as its own executable file, but as I can see now, there already is one out there, so mine is pointless for anyone else.
My avatar is a poor likeness.
Ben Fisher
17 years ago
I have a Fuji 9500 too, and its file system seems to work on a K.I.S.S. system that's designed to be idiot proof for the general public but doesn't offer much sophistication for the sort of thing it sounds like you're planning. You can however ensure unique filenames (i.e. numbers) in one of the camera menus; this stops it restarting from DSC0001.jpg even if it realises it's dealing with a blank card. It creates a new folder when you get to DSC9999.jpg - and even if you delete older camera folders manually, it recreates them. This suggests its file system is not meant to be tampered with, and if you want to keep metadata intact it might be worth going along with this to some extent. I find it very easy to manage folders in Windows - just cut/paste from the card to clearly labelled chronological folders.
royfellows
17 years ago
Thanks, I am aware of this as I will need to 'zero' the camera from time to time.

Also, you can rename files in the camera memory card using a connected computer in Windows Explorer or similar if you want to say, run on from a certain number.

Here is a useful one for people who like to 'get their hands wet' when working with computers.
It is easier to work within the file system using Windows Explorer but with a command line switch so that it opens to the root drives. You will, by this method see 2 panes on your screen, the left pane will have drives which can be expanded, the right will show the sub folders and files.

Create a shortcut on your desk top and paste the following command line into the dialog box.

"C:\Windows\Explorer.exe /n,/e, C:\"

Without the inverted commas

You can give any name to your shortcut, recommend "File Manager" to avoid confusion with Internet Explorer.

When you open it go to the "Tools" menu and select "Folder Options" Click the "View" tab and clear the check box that says "Hide File Extensions", you can also check the box "Show Hidden Files".

Using this you can easily copy files from say pen drives to HDD and so forth in an easy manner. Why Microsoft hide file extensions is beyond me, I suppose they cater for a reading age of 4 yrs and want people looking at pictures instead of reading English. File extensions tell you what type of file you are looking at, examples: jpg = image, doc = Word Document, xls = Excel spreadsheet etc

If using Vista you will have to go to Control Panel to find Folder Options

My avatar is a poor likeness.

Disclaimer: Mine exploring can be quite dangerous, but then again it can be alright, it all depends on the weather. Please read the proper disclaimer.
© 2005 to 2023 AditNow.co.uk

Dedicated to the memory of Freda Lowe, who believed this was worth saving...