Moving, Renaming and remebering filenames

Results 1 to 2 of 2

Thread: Moving, Renaming and remebering filenames

  1. #1
    Join Date
    Dec 1969

    Default Moving, Renaming and remebering filenames

    Hello all<BR><BR>This site has been very useful for me but I still need some help.<BR><BR>I have managed to use code from your ASPFAQs to allow me to 1. List the contents of a directory and 2. Rename a file<BR><BR>However my request is kind of a combination between renaming and moving files within directories and the questions are as follows:<BR><BR>1. How can I read the contents of a directory that does not reside within the Web Server but on a seperate server accessible by all?<BR><BR>2. How can I then take a file from this directory and move it from its source directory to another directory. (Still on the same server but not on the same server as the web page)<BR><BR>3. How can I then rename this copied over file but still remember the old name of the file. Maybe I can pipe the old name and the new name to a logfile.<BR><BR>4. How can I then display in a web page the old name and then the new name of the file. If the values were pipped across into a logfile in the previous request then at this stage I would need to read the logfile. <BR><BR>I wonder if someone can assist me in this problem.<BR><BR>Many thanks <BR>aVBlearner

  2. #2
    Join Date
    Dec 1969

    Default RE: Moving, Renaming and remebering filenames

    You will need to make sure you have access to the other server&#039;s file system from your web server. You will then need to make sure that the IIS user from your web server has the appropriate permissions on the file server that you will be reading the files from and writing the files to.<BR><BR>After you verify this information just use the path to the other server with the file system object just like you would if the source directory was local.<BR><BR>For saving the file name, you will need to get the name of the source file in order to copy and rename it anyway, so just store the original file name in a variable (or db field if you need it later). Once you have the file name in a variable or a field from the recordset, you can use that to display the old name.

Posting Permissions

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