?
Solved

Generating a guid in ColdFusion

Posted on 2008-11-12
3
Medium Priority
?
2,153 Views
Last Modified: 2013-12-20
Anyone can point me to how to generate guids in ColdFusion?

I have a file that is generating by a cffile move on a server.

Trying to prepare for the case of more than user trying to use the file at the same time.

A coworker suggested using guid in coldFusion and I would like to learn how to do it with the code snippet attached below.
<cfset filePath = 'c:\Temp\OfferTargetingZIP_Associations.txt'>	
<cffile 
         action="move" 
	source="#ARGUMENTS.ValidZIPsFilePath#" 
	destination="#filePath#" 
/>

Open in new window

0
Comment
Question by:onaled777
  • 2
3 Comments
 
LVL 19

Accepted Solution

by:
erikTsomik earned 500 total points
ID: 22941339
0
 
LVL 27

Expert Comment

by:azadisaryev
ID: 22941358
cf has CreateUUID() function which generates a "35-character string representation of a unique 128-bit
integer".
0
 
LVL 27

Assisted Solution

by:azadisaryev
azadisaryev earned 500 total points
ID: 22941400
fyi, cf uuid format is xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx, where x is a hexadecimal digit (0-9 or A-F). The character groups are 8-4-4-16
This does not conform to the Microsoft/DCE standard, which is as follows:
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx (8-4-4-4-12)
There are UUID test tools and a user-defined function called CreateGUID, which converts CFML UUIDs to
UUID/Microsoft GUID format, available on the web at www.cflib.org.

[all from CFML reference for CreateUUID() function]
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

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

Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
Objective of This Article In 1990’s, when I was a budding software professional, I had a lot of confusion about which stream or technology, I had to choose to build my career. In those days, I had lot of confusion like whether to choose System so…
The purpose of this video is to demonstrate how to manually back up a WordPress Database. This will be demonstrated using a Windows 8 PC. The Host used will be IPage.com Log into your Hosting account. IPage will be used for demonstration : Locat…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
Suggested Courses

807 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