|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can anybody help me solve this problem please?
I am having a problem doing this. Is there anybody who can help me in understanding exactly what I need to do or even help with some coding? I thank all in advance who can help.
The QuickSnaps stock photo company has many different freelance photographers
working for them. Each of them names their photo scans by different file names. But for
the companies purposes they need photo filenames to be in the format
<title><catagory><index#>.<format>
So for example...
AppleTree_Vegetation01273.jpg
AppleTree being the title. _ is a separator, Vegetation is the category, and 01273 is the
index number.
So they need you to write a program that will allow them to take all the images in a
directory and convert them into the same category, appending an index number to them
from 00001 up to the total number of files in the directory.
Once this is done the program needs to be able to look at each individual image and alter
the filename to add the title to the file.
Hints:
Using strings and substring functions will help manage the filenames.
There are DOS like file commands in visual basic that allow you to rename a file,
change a directory, etc.
The Visual Basic File contols (Drive list, directory list, and file list boxes) will also help
you to both build the user interface, and derive all the relevant data needed to do the file
renaming.
|
|
#2
|
||||
|
||||
|
Smells like homework to me!
Fairly easy homework. |
|
#3
|
||||
|
||||
|
lol
at least he tried! ![]() |
|
#4
|
|||
|
|||
|
Homework eh....
Well this is an assignment, I have done some of it but I am stuck in a lot of places and the stuff I have done is over riding alot of commands and finding itself to be tangled thats why I thought it would be good to get some fresh Ideas to expand the narrow path I am thinking in.....Any takers?
Ryan |
|
#5
|
||||
|
||||
|
Hint:
Loop through the directory, for each image, rename it implementing a counter. That's all you need to do. Example: Code:
imageCount = 1 For Each image in ImageDirectory Rename imageName, imageName & "_" & DirectoryName & imageCount & "." & imageExtension imageCount = imageCount + 1 Next |
|
#6
|
|||
|
|||
|
So lets say the following:
Im VERY new to VB. So i want a directory list drop box, a Drive list drop box, and file list. Now would I be implementing that code on which segment of the program? Would I put that onto a button? or in the file list box?? Im unclear as to the steps I take in starting this out..."Our teachers are bad" vvveerrryyy bad.. I have nobody else to turn to...Thanks for all your help and if you can continue to do so I greatly appreciate this.. its how I learn slowly.
Ryan |
|
#7
|
||||
|
||||
|
I sincerely doubt your teachers are bad, considering I am a part-time teacher myself.
I think you fail to fully grasp the concept. Try talking to your teacher and tell him/her you are struggling, I'm sure he/she will help you understand it better. If you don't tell the teacher you are struggling and you don't ask for help from them first, then you are the only one to blame for you failing. |
|
#8
|
|||
|
|||
|
I did that and got an extension.
This isnt the type of assignment I can do that with. I need to do this one on my own, but I need some lead as to how I do it, the teacher isnt bad... just not explanitory....so to speak, But i can ask others if this is just an annoyance its no problem. I was reccomended hear by a friend of mine Michael Youseff who writes articles here for the C++ section so I thought I would give it a chance.
Ryan |
|
#9
|
||||
|
||||
|
Explain (in detail) what exactly you are wanting and I will try to create a sample for you.
|
|
#10
|
|||
|
|||
|
Ok here it is:
I want to create a directory that holds images of all different names. When the user loads up the directory they can click a button that says "rename" and within that directory it will rename all the files to be "name"_0001(all the way up to 30).jpg . So for the interface I will have a drive box, a file box and a directory list box... the file box is the one that will contain the final viewing of all the images.. So I would want the file box to be the target for changing all the files automatically. Is this alright for detail?? Thanks a bunch by the wy memnoch
Ryan |
|
#11
|
|||
|
|||
|
Anybody?
Anybody have any ideas at all what I should do? Im confused and keep getting errors....keeps saying Variable required when i assign code to the rename button.
|
|
#12
|
|||
|
|||
|
Quote:
I fear you won't do well on this assignment, you haven't picked up on the fact that no one can help you without details, post the code that's producing errors, identify the line of code that causes the error, and describe you problem in detail.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Can anybody help me solve this problem please? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|