Wargod18 Posted January 18, 2007 Report Share Posted January 18, 2007 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 are1. 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? Quote Link to post Share on other sites
jcl Posted January 18, 2007 Report Share Posted January 18, 2007 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. Quote Link to post Share on other sites
Wargod18 Posted January 18, 2007 Author Report Share Posted January 18, 2007 Im sorry its VB6 i thought i out that in there. Quote Link to post Share on other sites
iccaros Posted January 22, 2007 Report Share Posted January 22, 2007 (edited) File.move(original_name, new_name)orSystem.IO.File.Move(FileToMove, MoveLocation)C# is the sameit 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 winFormsyou need to test if the file is there firstif (File.Exists(source))thenSystem.IO.File.Move(source, dest) Edited January 22, 2007 by iccaros Quote Link to post Share on other sites
willams Posted October 25 Report Share Posted October 25 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. Quote Link to post Share on other sites
chrisgreenwaltyy Posted November 2 Report Share Posted November 2 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. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.