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.
In VBScript language there is no any function for Input/Output on hard disk. But you may use FileSystem Object to create and edit files on server. This is an indirect technics to create any file on server.
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.
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.
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.
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.
The author writes "A CSV (Comma Separated Values file sometimes referred to as a flat file) is essentially a text file that has a comma delimiter between the table values and a unique line for each observation. While this is usually a means by which data is transferred from one database to another by itself can be used as input to an asp document." This example will show how to take virtually any CSV file and write it to an html table using ASP.
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.