Sinisterly
Excel VBA - Rename all files within a folder - Printable Version

+- Sinisterly (https://sinister.li)
+-- Forum: Hacking (https://sinister.li/Forum-Hacking)
+--- Forum: Hacking Tools (https://sinister.li/Forum-Hacking-Tools)
+---- Forum: Hacxx's Posts (https://sinister.li/Forum-Hacxx-s-Posts)
+---- Thread: Excel VBA - Rename all files within a folder (/Thread-Excel-VBA-Rename-all-files-within-a-folder)



Excel VBA - Rename all files within a folder - hacxx - 05-08-2022

Source: https://vm.tiktok.com/ZMLWCRfFF

1) Open Excel
2) Type folder path on cell A1
3) Type your folder location on cell B1
4) Press Alt + F11
5) Insert > Module

6) Write
Code:
Sub Rename_all_files_in_a_folder() Folder_Name = Range("B1").Value File_Name = Dir(Folder_Name) Do Until File_Name = ""         Name Folder_Name & File_Name As Folder_Name &  _         "The text to add" & File_Name         File_Name = Dir         Loop End Sub