Generating a guid in ColdFusion

Posted on 2008-11-12
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'>	






Open in new window

Question by:onaled777
    LVL 19

    Accepted Solution

    LVL 27

    Expert Comment

    cf has CreateUUID() function which generates a "35-character string representation of a unique 128-bit
    LVL 27

    Assisted Solution

    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

    [all from CFML reference for CreateUUID() function]

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    Join & Write a Comment

    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…
    When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
    The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: :…
    The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…

    746 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now