Sponsored By

Sign in to follow this  

Writing A Program In Vb To Convert Files En Mass

Recommended Posts

I am writing a program to rename Files in VB en Mass. I have almost all of the program working the only thing i don't know how to do is have VB rename the files in the folder I choose in the directory box. I have everything else all i have to do(in theory is throw in the code and it should work).

I use a program called Ipodwizard(Google it) to change how my Ipod looks. you can add themes and change the pictures on it. anyway every time Apple releases a new firmware upgrade it makes the old themes obsolete. they change the picture names so old themes don't work, this program i am writing will rename the pictures( bitmaps) to the new format going back from the first version to the latest version.

My questions are

1. How do i get VB to recognize the directory the person navigated to in the directory box and then rename the files I specify?

2. how do i get VB to make a sub directory and put the renamed files in the sub directory?

Share this post

Link to post
Share on other sites

VB.NET or VB Classic (version <7)? I don't know either of them, but with all the interest in VB 'round here recently I've been thinking of picking up VB.NET.

Share this post

Link to post
Share on other sites

File.move(original_name, new_name)


System.IO.File.Move(FileToMove, MoveLocation)

C# is the same

it shows up under VB6 so I assume it works, but it does in VB.net

SharpDevelop can give you a free way to go to .net (vb and C#) and it works mostly like Visual Studio including winForms

you need to test if the file is there first

if (File.Exists(source))


System.IO.File.Move(source, dest)

Edited by iccaros

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this