Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 11th, 2005, 12:10 PM
ryant ryant is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 ryant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #2  
Old January 11th, 2005, 12:14 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
Smells like homework to me!
Fairly easy homework.

Reply With Quote
  #3  
Old January 11th, 2005, 12:16 PM
Shadow Wizard's Avatar
Shadow Wizard Shadow Wizard is offline
Moderator From Beyond
ASP Free God 46th Plane (27500 - 27999 posts)
 
Join Date: Sep 2004
Location: Israel
Posts: 27,747 Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)Shadow Wizard User rank is General 14th Grade (Above 100000 Reputation Level)  Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1Folding Points: 378559 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 5 h 43 m 27 sec
Reputation Power: 1914
lol
at least he tried!

Reply With Quote
  #4  
Old January 11th, 2005, 02:36 PM
ryant ryant is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 ryant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #5  
Old January 11th, 2005, 04:08 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
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

Reply With Quote
  #6  
Old January 11th, 2005, 06:54 PM
ryant ryant is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 ryant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #7  
Old January 11th, 2005, 07:22 PM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
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.

Reply With Quote
  #8  
Old January 11th, 2005, 07:34 PM
ryant ryant is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 ryant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #9  
Old January 12th, 2005, 12:38 AM
Memnoch's Avatar
Memnoch Memnoch is offline
Unholy Moderator
Click here for more information.
 
Join Date: Oct 2003
Location: In hell, where did you think?
Posts: 11,781 Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level)Memnoch User rank is Lieutenant Colonel (40000 - 50000 Reputation Level) 
Time spent in forums: 3 Weeks 5 Days 8 h 45 m 55 sec
Reputation Power: 470
Explain (in detail) what exactly you are wanting and I will try to create a sample for you.

Reply With Quote
  #10  
Old January 12th, 2005, 08:33 AM
ryant ryant is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 ryant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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

Reply With Quote
  #11  
Old January 12th, 2005, 08:26 PM
ryant ryant is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 6 ryant User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
  #12  
Old January 12th, 2005, 11:28 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 29 m 58 sec
Reputation Power: 181
Quote:
Originally Posted by ryant
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.

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

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > Can anybody help me solve this problem please?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.