File rename not running in cfmx7 on shared server.

Discussion in 'Programming' started by unitedlocalbands, Jan 28, 2009.

  1. #1
    It works fine on my testing server but doesn't seem to run completely on the remote server.

    This is supposed to rename the file.serverfile var if it finds unwanted characters.

    
    <cfif REFindNoCase(('["\/\\\[\]:;\|=,\*\?]|\s+'), File.ServerFile)>
                
            <cfset NewfileName = REReplace(File.ServerFile, ('["\/\\\[\]:;\|=,\*\?]|\s+'), "_", "ALL")>
                 
             <cffile action="rename" source="#var.uploadpath##File.ServerFile#" destination="#var.uploadpath##NewfileName#">
            
           </cfif>
    
    Code (markup):
    Its not doing anything at all. My pages stops running when it gets here. I use cftry and catch and output a pdf error page but there seems to be no error. The page stops running.
     
    unitedlocalbands, Jan 28, 2009 IP
  2. Paul_K

    Paul_K Greenhorn

    Messages:
    85
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    18
    #2
    Do you have access to cffile. Some hosts block it.
     
    Paul_K, Feb 1, 2009 IP