• About us
  • Our Methodology
  • Our Portfolio
  • 1st Page Ranker
  • Voice Buddy
  • Product Support Desk
Agarwal InnoSoft Labs LogoAgarwal InnoSoft Labs Sticky Logo Agarwal InnoSoft Labs
  • Home
  • About Us
  • Software Development
  • Portfolio
  • Latest News
  • Articles
  • Contact Us
6 Feb 2013

Mass Rename Files and Folders 13 years ago

0
Yogesh Agarwal
Posted by Yogesh Agarwal
Articles, programming tips

Hi,

This Small Code Helps us to Rename file in the Folder… Be Carefull with it..

 If Directory.Exists(TextBox1.Text) Then
            If Not TextBox2.Text = "" Then

                Dim str As String
                Dim ct As Integer
                ct = 0
                Try

                    For Each element As String In Directory.GetFiles(TextBox1.Text)
                        ListBox1.Items.Add(element)
                        str = TextBox1.Text & "\" & TextBox2.Text & " " & ct & ".jpg"
                        File.Move(element, str)
                        ct += 1
                    Next
                Catch ex As Exception
                    MsgBox(ex.ToString)
                End Try

                For Each element As String In Directory.GetFiles(TextBox1.Text)
                    ListBox2.Items.Add(element)
                Next
            Else
                MsgBox("Value Missing")

            End If
        Else
            MsgBox("Directory Not Found")
        End If

Textbox1 gets the folder name and textbox 2 gets the custom file name… suppose if folder name is,

c:\myname\myfiles

and if all files inside my files should be renamed to file 1, file 2 etc.. then in textbox2 we should give file. Be Careful with Extensions..

  • Read richtextbox line by line
  • richtextbox control line
  • RichTextBox Control Read Line by Line
Change "devenv" Command Shortcut from VS 2008 to VS 2010
Google About to Launch New Ranking Algorithm

Yogesh Agarwal

No Replies on Mass Rename Files and Folders

Leave a reply Cancel reply

You must be logged in to post a comment.

About US

Agarwal InnoSoft Pvt Ltd (AiSoft LLC) Specializes in Developing IM Softwares and Custom Software Development Works.

Social Networks

Categories

  • Articles (24)
  • Latest News (23)
  • Latest product (7)
  • programming tips (2)
  • seo (17)

Recent Posts

  • Blacklist August 11, 2018
  • How to Powerup Your Backlinks?... August 5, 2015
  • Major Update for Ezee Rank Tracker ... July 25, 2015
  • AIO Wiki Poster Beta Released!... July 24, 2015
  • Tracking Website Ranking July 6, 2015

Recent Comments

  • Brett T. Smith on Major Update for Ultimate Book...
  • Cesar Zabala on Ezee Rank Tracker Gonna Get a ...
  • Website Launch - Agarwal InnoSoft Pvt Ltd on Articles...

Tags

aio wiki poster anchor text auto social bookmarker auto wiki submission tool backlink cheker best wiki tool broken link check broken link finder check back link check for broken links check link for virus check my backlinks check my links create wiki links dead links ezee rank tracker free link checker free rank checker google penguin google penguin algorithm google penguin update google position checker inbound links checker link analysis software link building linkcheck link finder link popularity check links checker outbound link checker quality backlinks rank checker rank tracker search engine search engines serp checker serp tracker site link checker ultimate bookmarkr wiki bot wiki crusher wiki poster wiki submitter xenu link checker youtube rank tracker

Find us here

Social Networks

Our Contacts

  • info - [ a t ] - agarwalinnosoft.com
  • This Website is Owned and Operated by Agarwal InnoSoft Labs