ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change file name from folder using VBA (https://www.excelbanter.com/excel-programming/436322-change-file-name-folder-using-vba.html)

Ratheesh

Change file name from folder using VBA
 
Hi All -

Please, can anyone help to write a coding for changing the filenames
(all format) from a folder.
i.e,
I am having 2 files in C:\

C:\test.xls
C:\test1.pdf

Can we change these file names using VBA (Excel) as -

C:\changed.xls
C:\changed1.pdf

Thanks a lot in advance.
Ratheesh

JP[_4_]

Change file name from folder using VBA
 
I did a search for "vba rename file" and got several promising hits.

--JP

On Nov 18, 10:17*am, Ratheesh
wrote:
Hi All -

Please, can anyone help to write a coding for changing the filenames
(all format) from a folder.
i.e,
I am having 2 files in C:\

C:\test.xls
C:\test1.pdf

Can we change these file names using VBA (Excel) as -

C:\changed.xls
C:\changed1.pdf

Thanks a lot in advance.
Ratheesh



Don Guillett

Change file name from folder using VBA
 
Some combination using DIR to find the filename and NAME to change the name.

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Ratheesh" wrote in message
...
Hi All -

Please, can anyone help to write a coding for changing the filenames
(all format) from a folder.
i.e,
I am having 2 files in C:\

C:\test.xls
C:\test1.pdf

Can we change these file names using VBA (Excel) as -

C:\changed.xls
C:\changed1.pdf

Thanks a lot in advance.
Ratheesh



Ratheesh

Change file name from folder using VBA
 
On Nov 18, 8:27*pm, JP wrote:
I did a search for "vba rename file" and got several promising hits.

--JP

On Nov 18, 10:17*am, Ratheesh
wrote:



Hi All -


Please, can anyone help to write a coding for changing the filenames
(all format) from a folder.
i.e,
I am having 2 files in C:\


C:\test.xls
C:\test1.pdf


Can we change these file names using VBA (Excel) as -


C:\changed.xls
C:\changed1.pdf


Thanks a lot in advance.
Ratheesh- Hide quoted text -


- Show quoted text -


Thanks, I had not searched that before in this group...
I know how to take the file names from a folder, but ididnt know how
to rename it....
one more doubt, is there any issue while executing codes in citrix...
i am not getting the proper results while I am running this in my
citrix environment...
Thank You.


All times are GMT +1. The time now is 04:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com