help needed with copy file command of the FileSyst

Results 1 to 2 of 2

Thread: help needed with copy file command of the FileSyst

  1. #1
    Join Date
    Dec 1969

    Default help needed with copy file command of the FileSyst

    guys i need ur help in this one too.<BR>check out the code<BR>1&#060;% path=Request.Form("diagrampath")<BR>2 if trim(path)="" then<BR>3 path="nopic"<BR>4 else<BR>5 Set objFSO = <BR>6 Server.CreateObject("Scripting.FileSystemObject")< BR>7 set objFile=objFSO.getFile(path)<BR>8 objFSO.CopyFile path,"D:online examimages\"<BR>9 path=objFile.Name<BR>10 path="..images\"&path<BR>11 end if<BR>%&#062;<BR><BR>guys check out line 8.<BR>here i am trying to copy a file from some location to my folder "D:online examimages\".<BR>but then this is the physical path ie "D:online examimages\".<BR>i want this path to be a relative one i.e "..images\" so that my application would not be dependent on the location of the application.<BR>any way out guys.<BR>i would also like to know whether one could copy files from the network using the copy file method<BR>thanks in advance guys<BR>

  2. #2
    Join Date
    Dec 1969

    Default Sure, but..

    .. you have to hack off the file name portion from line #9. You can use InStrRev() and Left() or Split(), it&#039;s your choice.<BR><BR>Yes, it&#039;s possible to copy files over a LAN using the copy file method. You just have to give the web server&#039;s local IUSR_MachineName account proper permissions.

Posting Permissions

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