Alternatives to FSO.CopyFiles???

Results 1 to 3 of 3

Thread: Alternatives to FSO.CopyFiles???

  1. #1
    Join Date
    Dec 1969

    Default Alternatives to FSO.CopyFiles???

    In my ASP script I am trying to copy files from a seperate server within our network to our webserver. Enhancing the speed of this process is the major issue since some of the files are as big as 750MB. Right now I am using the CopyFile method of FSO as shown:<BR><BR>&#062;Set objFSO = Server.CreateObject("Scripting.FileSystemObject")< BR>&#062;objFSO.CopyFile source_files, temp_dir<BR><BR>This works okay, but runs super-slow. When I timed the CopyFile line, I found it copied at a rate of 0.27MB/sec. HOWEVER, when I tried to run the same procedure via DOS command-prompt from a 3rd party computer, it copied the same files at a rate of 3MB/sec!!!! This tells me the network speed isn&#039;t the limiting factor here. Are there any other alternatives to FSO methods for copying files????? Do I need to evoke a DOS command thru ASP (and if so how do I do this)?? Please help... <BR><BR>thanks,<BR>Andy<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default You could use a COM object...

    If you wrote a VB COM object and then registered that on your server, the COM object could use the API to copy the file:<BR><BR><BR>All you would need to do is put this line into a module:<BR>Public Declare Function CopyFile Lib "kernel32" _<BR> Alias "CopyFileA" _<BR> (ByVal lpExistingFileName As String, _<BR> ByVal lpNewFileName As String, _<BR> ByVal bFailIfExists As Long) As Long<BR><BR>Then call it something like:<BR>Dim lngResult as Long<BR>lngResult = CopyFile("C:myfile.log", "D:myfile.log", False<BR><BR>Not sure about the relative speeds of these things, but the API is the lowest level method of copying files I can think of.<BR><BR>Craig.

  3. #3
    Join Date
    Dec 1969

    Default I've used....

    ... WScript.Shell to command a DOS copy in the past - we had a network issue, and it seemed to work very well...

Posting Permissions

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