Moving a file

Results 1 to 3 of 3

Thread: Moving a file

  1. #1
    Dan W Guest

    Default Moving a file

    I&#039m writing an app that ultimately creates<BR>a new folder and places a template asp file<BR>(index.asp) inside the new folder. <BR><BR>The template file is called index_temp.asp<BR>I want to copy that file and place and rename<BR>it to index.asp inside the newly created folder.<BR><BR>Can I use the FileSystemObject?<BR>I only see examples that create <BR>a new file or append to an existing file?<BR><BR>-thanks

  2. #2
    ian Stallings Guest

    Default RE: Moving a file

    Yes this can be done.<BR><BR>&#060;%<BR>strOld = "d:usersindex_temp.asp"<BR>strNew = "d:
    ewpathindex.asp"<BR><BR>Set oFileSys = CreateObject("Scripting.FileSystemObject")<BR>&#03 9 first copy<BR>oFileSys.Copyfile strOld, strNew<BR>&#039 you can then use "movefile" to rename them<BR>oFileSys.MoveFile strOld, strNew<BR><BR>&#037;&#062;<BR><BR>This is just an example that it can be done.<BR>You can change the varibles to whatever or assign them<BR>via the script, etc.<BR><BR>I hope this helps you.

  3. #3
    Join Date
    Dec 1969
    Posts
    1,364

    Default RE: Moving a file

    Yes a big one!<BR><BR>thanks

Posting Permissions

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