KeyBored Posted April 23, 2007 Report Share Posted April 23, 2007 Hi All, I noticed that some websites containing images use the same filename for all images. For example, instead of different filenames such as image1.jpg, image2.jpg, etc., the website names all of their images with the same filename, such as "untitled.bmp". It's tedious to manually change the filename every time I want to save another image. The macro would work as follows: I right-click on an image and choose "Save Picture As...". The dialogue box appears "Save Picture". The macro would detect identical filenames already saved and automatically assign a new name before saving the image. Thanx, KeyBored Quote Link to comment Share on other sites More sharing options...
Cory Posted April 23, 2007 Report Share Posted April 23, 2007 And your question is..... Assuming if you are asking if this can be done it can. I have a subroutine that takes a file name and path and check to see if it's unique. If it isn't it adds a number on the end until the file name is unique. Pretty simple. Quote Link to comment Share on other sites More sharing options...
KeyBored Posted April 26, 2007 Author Report Share Posted April 26, 2007 And your question is..... Assuming if you are asking if this can be done it can. I have a subroutine that takes a file name and path and check to see if it's unique. If it isn't it adds a number on the end until the file name is unique. Pretty simple. Cory: Please provide the script for your subroutine. Regards, KeyBored Quote Link to comment Share on other sites More sharing options...
Cory Posted May 1, 2007 Report Share Posted May 1, 2007 Sorry, I was in Tucson for a few days. This page documents my file increment macro subroutine. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 1, 2007 Report Share Posted May 1, 2007 Hopld on a sec. That was my old one and I did it a stupid way. Give me a few minutes and I'll post a better one. Quote Link to comment Share on other sites More sharing options...
Cory Posted May 1, 2007 Report Share Posted May 1, 2007 OK, now try my link. In the beginning I had a more lengthy way of generating the padded number then I thougth of a quick and dirty means that worked a lot better. Enjoy! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.