I had to the same thing as I was adding 001 002 etc.. to duplicate
filenames in
VB.NET
If the file existed I added 001, if that existed I added 002, but
removing the 001 etc.. sometimes removed char from the middle of the
name or the first instance, so I deleted the last three chars as
below...
I used :
templength = filename.Length
filename = filename.Substring(0, templength - 3)
*** Sent via Developersdex
http://www.developersdex.com ***