Batch file to rename files in a folder
Closed
poorani
-
Oct 29, 2009 at 04:32 AM
aprpillai Posts 4 Registration date Wednesday November 4, 2009 Status Member Last seen November 5, 2009 - Nov 5, 2009 at 02:53 AM
aprpillai Posts 4 Registration date Wednesday November 4, 2009 Status Member Last seen November 5, 2009 - Nov 5, 2009 at 02:53 AM
Related:
- Batch file to rename files in a folder
- Windows 10 iso file download 64-bit - Download - Windows
- Kmspico zip file download - Download - Other
- Rename computer cmd - Guide
- Anvi folder locker reset key - Guide
- Rename lg tv - Guide
1 response
aprpillai
Posts
4
Registration date
Wednesday November 4, 2009
Status
Member
Last seen
November 5, 2009
Nov 5, 2009 at 02:53 AM
Nov 5, 2009 at 02:53 AM
Hi,
Write a Macro to Read the Cell Ranges that contain Market Code & Market Name Values in a loop and take Market Code in one string Variable say: strMarketCode and Market Name in strMarketName and run the DOS Command REN in Shell command like the following to rename each file:
Call Shell("REN C:\MyFolder\" & strMarketName & " " & strMarketCode)
The shell command must be called for each file. It is better if you create a delay loop immediately after executing the above shell command to give some time to DOS to execute the command like the following:
T= timer
Do While timer < T+0.5
' delay
Loop
this will give a delay of half a second before running the next shell command. You may increase the time to one second or more.
Regards,
a.p.r. pillai
Write a Macro to Read the Cell Ranges that contain Market Code & Market Name Values in a loop and take Market Code in one string Variable say: strMarketCode and Market Name in strMarketName and run the DOS Command REN in Shell command like the following to rename each file:
Call Shell("REN C:\MyFolder\" & strMarketName & " " & strMarketCode)
The shell command must be called for each file. It is better if you create a delay loop immediately after executing the above shell command to give some time to DOS to execute the command like the following:
T= timer
Do While timer < T+0.5
' delay
Loop
this will give a delay of half a second before running the next shell command. You may increase the time to one second or more.
Regards,
a.p.r. pillai