Wrox Home  
Search P2P Archive for: Go

  Return to Index  

interdev_programming thread: Coding FTP


Message #1 by "martha j sayers" <marthaj@r...> on Mon, 17 Sep 2001 03:46:29
Hi Folks,

  I have posted my coding, in hopes tha someone could tell me two things:
    1.how I can "hide" the path of the file. I don't care if they see the 
folder name and the file to download.
    2.this coding ,if I click on the file-nmae does bring up the dialog 
box which allows me to select "save Target as", but when I click on that 
option, it does nothing. Why ??
I am a real stumped chump.
Any help would be appreciated,
tahnk you so much,
marthaj



'on error resume next
  Session("TestFolder") = "TEST" 
  vtestfolder = trim(Session("TestFolder"))
  set objFs = Server.CreateObject("Scripting.FileSystemObject")
  strFolder = "d:\Downloads\" & vtestfolder 
  'strFolder = "c:\Inetpub\ftproot\Downloads\" & vtestfolder 
  'vmap = "c:\Inetpub\ftproot\Downloads" & vtestfolder 
  'Server.MapPath(vmap)  
strFolder = "d:\Downloads\" & vtestfolder 
  Response.Write "<P><STRONG><FONT color=saddlebrown>Below is the file you 
created.To download " & _       
                "simply highligh the filename and right-
click.</FONT></STRONG></P>"
  if objFs.FolderExists(strFolder) then
     set objFolder = objFs.GetFolder(strFolder)
     set x = objFolder.Files
     for each y in x
         vfilename = y.name
          Response.Write "<A HREF=" & "FTP:=d:\Downloads" & "\" & 
vtestfolder & vfilename  &  ">TEST.TXT</A>"    
          Response.Write "<BR>"
     next    
  else
    Response.Write "NO FILES WERE FOUND"
  end if    
 
 'Server.MapPath("/")
 set objFs = nothing
  

  Return to Index