Accessing & Deleting files from server?????

Results 1 to 2 of 2

Thread: Accessing & Deleting files from server?????

  1. #1
    mapar Guest

    Default Accessing & Deleting files from server?????

    The way I have my asp page setup is that i use the filesystemobject to get a file from a folder on the server.<BR><BR>Eg: <BR>getfile = "........ estfiles" random1 & "101"<BR>Set getfile2 = Server.createObject("Scripting.FileSystemObject")< BR>getfile3 = Server.MapPath(Getfile1)<BR>Set Instream = Getfile2.OpenTextFile(Getfile3, 1, False, False)<BR><BR>Is there any way first of all to just look for a "101" file? <BR><BR>What I am trying to do is set it up so that instead of looking for the random1 variable value & a 101 on the end, I am going to look for a "generic" 101 file and open it up and check to see if the first line in the file matches the variable random1. If I get a match then I will assign variables to the rest of the lines and use them in the ASP page. The thing however is that I am unsure of the syntax to check the first line for a match, & if not go back to the folder and go through the remaining 101 files till we match. In addition is there any way I can delete this 101 file after I am through with it...<BR><BR>Thanks in advance<BR><BR>I am new to ASP and trying to learn.

  2. #2
    Join Date
    Dec 1969

    Default Learning about the FileSystemObject

    I&#039d highly suggest that you take some time and read some articles on using the FileSystemObject. There are some good articles at:<BR><BR><BR><BR>Happy Programming!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts