peaseblossom
IS-IT--Management
Hi there:
I am trying to write a program that renames all files beginning IMAG (from my camera) to a more descriptive name. I have written the renaming part but if the file name to which the originating file is renamed already exists then the renaming does not take place - and the IMAG file is lost. Sooo....I have written a part that reads the directory for the file name I want to use but I would like to have just the count of the number of files returned into a text box to warn me that my new name is 'taken'. In other words, a count of the elements in the array of the files.
For example, renaming my IMAG file to, say XMAS07 would display the count of the number of files already beginning XMAS07.
And, yes, once I understand that I will look at a loop that checks the file automatically...that is for later!
Thanks!
I am trying to write a program that renames all files beginning IMAG (from my camera) to a more descriptive name. I have written the renaming part but if the file name to which the originating file is renamed already exists then the renaming does not take place - and the IMAG file is lost. Sooo....I have written a part that reads the directory for the file name I want to use but I would like to have just the count of the number of files returned into a text box to warn me that my new name is 'taken'. In other words, a count of the elements in the array of the files.
For example, renaming my IMAG file to, say XMAS07 would display the count of the number of files already beginning XMAS07.
And, yes, once I understand that I will look at a loop that checks the file automatically...that is for later!
Thanks!