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?

Link to post
Share on other sites

File.move(original_name, new_name)

or

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))

then

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

Edited by iccaros
Link to post
Share on other sites
  • 17 years later...

Writing a program in Visual Basic (VB) to convert files en masse involves creating an application that automates the conversion process for multiple files simultaneously. This can be achieved using built-in file handling methods and libraries.  comcast tv support phone number  The program should allow users to select source files and specify the desired output format, enhancing efficiency and saving time when managing large volumes of data.    

Link to post
Share on other sites
  • 2 weeks later...

To get your VB program to rename files in the selected directory, you can use the FolderBrowserDialog to let users pick a folder, and then loop through the files with Directory.GetFiles(). For renaming, just use File.Move() to change the names as needed. If you want to create a subdirectory for the renamed files, use Directory.CreateDirectory() and set it up before you start renaming. It’s pretty straightforward—just adjust the paths accordingly.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...