A D V E R T I S E M E N T
ASP » Tips and Tutorials » File Manipulation
Displaying Sub Folders - Free
Following example displays all sub folders in current folder. We will use SubFolders property of FileSystem Object for this source code. First we will find our current path using System.MapPath. Delete Files Online - Free
Following active server pages code delete a file. Example uses FileSystem object to delete the file. Do not forget to double check permissions for this operation. Delete Folders Online - Free
ASP does not allow you to use IO system to modify on files and folders. But with the help of FileSystem object you can delete any file on your server. Do not forget to double check permissions for this operation. read a file
This is some sample code for reading a file . create a file
Easy code for creating a file file information
This example displays some useful file examples . Last accessed , last modified and when the file was created Create a "downloads page"
An easy example that shows how to build a page with a bunch of downloads if you DO NOT what the users to know the exact path where all of your files are stored. Also learn how to make a downloads counter! Copying Files (using File System Object)
Sometimes you need to copy files to another folder. First you should require to use FSO (File System Object.) CopyFile method of FSO is the simplest way to copy the files. Following sample code will copy some files to another folder. Checking Files Exists
If you want to check a file exists, you may use this code. First we are starting script creating a copy of File System Object. FSO has many useful methods. One of them is 'FileExists' that we will use it now.
Copying Folders (using File System Object)
If you want to copy some foldes to another folder, first create a File System Object. CopyFolder method will help you to copy folder to another folder. Create a text file using ASP
Shows how to create a text file using the File Scripting Object. Write to a file with ASP and FSO.
This tutorial will show you how use the File Scripting Object to both write to and append to a text file. Delete a folder with ASP
For whatever reason, there are times when it would be convenient to know how to delete a folder without having to go to the server to do it. This is just one of the things you can do with the File Scripting Object. Last Updated
A code snippet to display the last modified date for any given file dynamically. Every time the file is modified this info is written into the file. The FSO knows just how to read that for you. Uploading files to the server hard disk using plain ASP
Step-by-step tutorial on how to upload files (images, etc) from the client browser to the server hard disk using plain ASP pages. Complete application source code is available for download including the code to upload and display uploaded files to the user in an eary to use and understand manner. Open, Read and Create Files with ASP
This tutorial explains opening, reading and creating files using example codes. Up to 6 examples are used. Auto-upload using IE+ADO without user interaction
This article shows a simple way to upload files from client to server using VBS, IE and ADODB as multipart/form-data document. Full source code included. Searching Drives, Viewing and Downloading Files
This article illustrates some great uses of the File System Object. It shows how to choose a drive to search, and then builds a listbox of all the folders on that drive. Choose a folder and it builds a listbox of all the files in that folder. Choose a File and it will display it in the browser or prompt you to save the file to your hard drive. ASP Form Input to HTML
The author writes "ASP has the ability to write .html or any other text based documents directly to a web server (You need to write the text output to a directory that has write authority). This enables the instantaneous publication of user input without the need for uploading files from a PC." This example code shows how to write text based documents to a server using ASP. Working with Drives, Folders and Files using ASP
Article on accessing drives, folders and files with ASP; iterating though drives, folders and files collections, reading content of a file and more. Also provides detailed listing of all properties and methods of FileSystemObject, Drive, Folder, File and TextStream objects.
A D V E R T I S E M E N T
||Subscribe to SourceCodesWorld - Techies Talk