Rename multiple files like windows does...

Rothariger

Well-known member
Joined
Apr 7, 2004
Messages
66
Hello....

i want to know if its posible to rename multiple files like windows does..

example:

file zzzzzzz.doc
file asdasd.doc
file esfsefse.doc

if you select the three files and rename it, windows put this way..

file(1).doc
file(2).doc
file(3).doc

is there any vb.net way of doing this?


thanks!!!


PS: off course i want the easy way, some way for windows api for make it... now i am making by code, but may be, theres a way automatically... or with an api...
 
Sure you can do it:
Code:
Dim num As Integer = 1

Dont know how youre selecting and renaming so this is pseduocode
For Each <selectedfile> In <selectedfilecollection>
   File.Rename(<selectedfilename>, <newname> & num & <extension>
   num += 1
Next <selectedfile>
 
Back
Top