Question

Locked

Changing multiple file extensions in VB

By jimmy-jam ·
Hello all
I need some help automating the renaming of a large group of files. I have an application that stores a large number of files in a folder. Occasionally one of these files gets corrupt and must be deleted. The files are sequential by the file extension. So I may have something that looks like this. All in the same folder.

XY123456.f01
XY123456.f02
XY123456.f03
XY123456.f04
XY123456.f05
XY234567.f01
XY234567.f02
XY234567.f03

Usually the file ext's go as high as .f55. You'll notice the different file names XY123456 and XY234567 belong to different groups and while stored the same place do not belong to the same part of the application.

Here's what I want to do let say in the group XY123456 the file with ext .f02 gets corrupt. I need to rename .f03 -> f02 and then continue to subtract 1 from the number in the file ext until I get to the last file in that group. What I do not want to have accidentally happen is every single file in the folder have 1 subtracted from it. Only the files in the group I specify. I hope that makes sense. Can anyone help me with this?

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Software Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums