[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How can I use CFFILE and make my upload unique?

Posted on 2002-05-20
3
Medium Priority
?
173 Views
Last Modified: 2013-12-24
I am familiar with the MakeUnique function within CFFILE, however, I would like to set the format of the renaming of the "like" files, instead of CF doing it.
 
An example of what I want to do when the file exist:

From this:  test_testing_v1.doc
To: test_testing_v2.doc

As you see, I wish to change just the last number before the ".doc" to increment to the next number.

How would you suggest I do this?
0
Comment
Question by:g118481
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
Yog earned 200 total points
ID: 7022633
#1
instead of makeunique, make it overwrite
check if file exists ( ),
 if exists then change the file name
else
 just upload

maybe you can generate a number from sequel identity

but why do you wanna do this..?

#2
keep it Makeunique and store the file names uploaded in a DB along with corresponding records if any or in a new table.

later run a schedule job which cleans up the filenames (if any name not readable), by checking each characters - alphanumeric or numeric blah blah if you want a decent name
0
 
LVL 1

Author Comment

by:g118481
ID: 7022805
Yog,

I'm trying to do this in order to get better control over the naming convention my group uses when uploading documents to our repository.

Is there not a way I can check for the existence of the file name, and if it does, rename it using the format I mentioned above?

I like the attribute of "MakeUnique", however, I know my group will complain that the unique name is nothing like the filename they uploaded.
0
 
LVL 5

Expert Comment

by:Yog
ID: 7024674
yeah you are right, you can always cheque for MakeUnique and if it exists rename files and keep uploading blah blah ...

0

Featured Post

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question