Category Archive for: File Management

Addressing Security Concerns

The CFFILE and CFDIRECTORY tags present something of a security concern, Because these tags can manipulate files and directories outside of the Web directory tree andcan delete files without confirmation, they need to be used with extreme care. The CFFILE tag particularly requires careful scrutiny because it can also be used to upload files onto the server, which could…

Read More →

Working with Diredories

Up to this point, you have considered specifically how to work with files, butnot directories. The CFDIRECTORYtag provides the ability to create, delete, rename, and list the contents of directories on the ColdFusion server. Like the CFFILE tag, the action taken by the CFDIRECTORYtag is controlled by the ACTIONattribute, which can take four possible values: Create   Creates a…

Read More →

Working with Text Files

The CFFILE tag provides a useful mechanism for working with text files and the text they contain. Three actions are possible when working with text files: reading, writing, and appending. W.e.will present each in turn Reading a Text File Reading the contents of a text file is done using the ACTION= n READ’ attribute of the CFFILE tag.…

Read More →

Making Sure an Upload Worked

Often, it is necessary to make sure the upload action was successful. Whenever AaION-· UPLOAD·is used, a range of variables with the Fi 1e. prefix are created, providing information about the success or failure of a file upload operation. These variables can be used in your template like other variables and parameters. The available variables are outlined in the…

Read More →

File Management

ColdFusion provides facilities for ~orking with files on the server, as well for sending files from the client browser to the server for storage and processing. For the most part, this work is accomplished with the CFFILEtag. This tag enables you to upload files from the browser through <INPUT TYPE=FILE)form fields; to copy, move, delete.and rename existing files; and…

Read More →

Back to Top