Want to rename Jpg files from diff paths

Sunil7598

New Member
Joined
Dec 28, 2022
Messages
20
Office Version
  1. 2016
Platform
  1. Windows
Hi Guys,

I want rename list of jpg files from diff paths. But the only issue is end of the path it has file name

\\arlmssan02\COM_Mumbai$\Namshi P2P & Catalogue Support\B&M\14 dec\Image Renaming\Mango_Input Data\Extra images of Mango Bidc 14 Dec\47001009_30_D8.jpgW1591482A-3S_1
\\arlmssan02\COM_Mumbai$\Namshi P2P & Catalogue Support\B&M\14 dec\Image Renaming\Mango_Input Data\Mango Bidc 14Dec Output\47001009_30.jpgW1591482A-3S_2
\\arlmssan02\COM_Mumbai$\Namshi P2P & Catalogue Support\B&M\Image renaming- practice\47001009_30.jpgW1591482A-3S_3
\\arlmssan02\COM_Mumbai$\Namshi P2P & Catalogue Support\B&M\Images rework- 12 dec-2022\47001009_30-99999999_01.jpgW1591482A-3S_4
\\arlmssan02\COM_Mumbai$\Sumit\Desktop\Extra images\Mango_Bidc\47001009_30_B3.jpgW1591482A-3S_5
\\arlmssan02\COM_Mumbai$\Sumit\Desktop\Image renaming Tejaswini\Images\47001009_30_B3.jpgW1591482A-3S_6

Column A is org file name with path & column b is new file name. and move all this files to a new folder.

I know it's difficult, but can anyone help me with this
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
try this:
------------------
Want to rename Jpg files from diff paths.xlsm
ABCDEF
1Old FileNew File PathNew File NameNew FullCount6
2\\arlmssan02\COM_Mumbai$\Namshi P2P & Catalogue Support\B&M\14 dec\Image Renaming\Mango_Input Data\Extra images of Mango Bidc 14 Dec\47001009_30_D8.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_1.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_1.jpg1
3\\arlmssan02\COM_Mumbai$\Namshi P2P & Catalogue Support\B&M\14 dec\Image Renaming\Mango_Input Data\Mango Bidc 14Dec Output\47001009_30.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_2.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_2.jpg2
4\\arlmssan02\COM_Mumbai$\Namshi P2P & Catalogue Support\B&M\Image renaming- practice\47001009_30.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_3.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_3.jpg3
5\\arlmssan02\COM_Mumbai$\Namshi P2P & Catalogue Support\B&M\Images rework- 12 dec-2022\47001009_30-99999999_01.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_4.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_4.jpg4
6\\arlmssan02\COM_Mumbai$\Sumit\Desktop\Extra images\Mango_Bidc\47001009_30_B3.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_5.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_5.jpg5
7\\arlmssan02\COM_Mumbai$\Sumit\Desktop\Image renaming Tejaswini\Images\47001009_30_B3.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_6.jpg\\arlmssan02\COM_Mumbai$\Sumit\Desktop\W1591482A-3S_6.jpg6
Output
Cell Formulas
RangeFormula
F1F1=MAX(E:E)
D2:D7D2=CONCATENATE("",B2,"",C2)
E2:E7E2=IF(D2<>"",ROW()-1,"")

------------
VBA Code:
Sub rename()

Dim OldName
Dim NewName
For counter = 2 To Range("F1").Value + 1
Worksheets("Output").Activate
OldName = Cells(counter, "A").Value
NewName = Cells(counter, "D").Value
Name OldName As NewName
Next counter
End Sub
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top