CFFILE Upload error  "String Index out of range:  -18"

Posted on 2006-05-25
Last Modified: 2013-12-24
I am attempting to use CFFILE to upload an MS Excel file from my PC to a server.  Unfortunately, I am getting the "String Index out of range:  -18" error.  Code is below.

<cffile action="upload" filefield="fileupload" destination="\\server\xxx\yyyy" nameconflict="overwrite">

In the form struct the "fileupload" variable looks as if it is set to this:


I would expect something like C:\foldername\file.xls

Help is greatly appreciated!
Question by:dkbailey1
    LVL 9

    Accepted Solution


    Take a look at this question/solution.  It might help

    Author Comment

    I read through this earlier.  I apparently have gotten lucky, in that I took part of the path from CGI.CF_TEMPLATE_PATH, and appended it to my folder\file in the destination source of CFFILE.  It works now, but I still do not grasp why I have ended up with a string that starts with a Drive letter, and not one where I use //servername/etc.

    Can you help clarify what is going on?

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
    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…
    Internet Business Fax to Email Made Easy - With eFax Corporate (, you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
    This video discusses moving either the default database or any database to a new volume.

    734 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

    23 Experts available now in Live!

    Get 1:1 Help Now