Create Unique Filename

Completed Posted Dec 15, 2003 Paid on delivery
Completed Paid on delivery

I need a quick VB6 function to return a unique file name in a directory. The parameters would be:

Beginning file name

Directory (full path)

Maximum filename length

This function will return a unique file name for the given directory that I can create without duplicating an existing file name. It will use as much as it can from the beginning file name parameter. The maximum filename length should default to 50. The filename length does NOT include the extension. For example, a maximum file length of 8 would allow a file name with 8 characters plus an extension.

The beginning filename should be used as a base. For instance, if the calling routine passes "[url removed, login to view]" as the beginning file name with a maximum length of 8, the routine would use as much of the beginning filename as possible. If the directory already contains a file named [url removed, login to view], the routine would try [url removed, login to view], [url removed, login to view], [url removed, login to view], etc. until it found a file name that is unique to the directory. If it uses up all the options, then it should return an empty string. It can recurse if necessary but preferably not because I don't want to use up a lot of stack space with this one function.

I need this as soon as possible. Need to finish a project and don't have time to write this routine. Need it today so I'll accept the first legit bid with a $ amount at $15 or under.

## Deliverables

1) Complete and fully-functional working function in module form as well as complete source code of all work done.

2) Exclusive and complete copyrights to all work purchased. (No GPL, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site).

## Platform

Windows '98/2k/xp

Engineering Microsoft MySQL PHP Software Architecture Software Testing Visual Basic Windows Desktop

Project ID: #3044879

About the project

12 proposals Remote project Active Dec 15, 2003

Awarded to:

stanishjohnd

See private message.

$12 USD in 14 days
(44 Reviews)
4.3

12 freelancers are bidding on average $9 for this job

icodeinvb

See private message.

$10.2 USD in 14 days
(316 Reviews)
7.1
TakeRealUK

See private message.

$12.75 USD in 14 days
(551 Reviews)
6.7
alinfaur

See private message.

$12.75 USD in 14 days
(163 Reviews)
5.9
vadymvw

See private message.

$8.5 USD in 14 days
(20 Reviews)
5.4
devicode

See private message.

$12.75 USD in 14 days
(70 Reviews)
4.7
epovw

See private message.

$8.5 USD in 14 days
(25 Reviews)
4.4
brantk

See private message.

$10.2 USD in 14 days
(35 Reviews)
4.2
aniakasha

See private message.

$8.5 USD in 14 days
(28 Reviews)
3.7
rareairsoftware

See private message.

$8.5 USD in 14 days
(6 Reviews)
3.0
cisindiavw

See private message.

$5.1 USD in 14 days
(12 Reviews)
2.7
stolevw

See private message.

$4.25 USD in 14 days
(28 Reviews)
2.6
baxsoft

See private message.

$4.25 USD in 14 days
(3 Reviews)
0.5