Print Page | Close Window

Copy files on the same server

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=13251
Printed Date: 30 March 2026 at 7:50pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Copy files on the same server
Posted By: zMaestro
Subject: Copy files on the same server
Date Posted: 07 January 2005 at 9:20am
I have a folder containing some files which are used between more than one website all on the same server.
 
when a website requests a file from this folder (using the physical path), how can I copy it to another folder under the website in order to be able to access it from the web.
 
the files are video files *.wmv
 
thanks



Replies:
Posted By: dj air
Date Posted: 07 January 2005 at 9:40am
if its inbeded in the page, you can link to anyfile you have access to i believe...

can always have an asp page, and use the content type top make the .asp page a wmv file and then able to use the physical path, simular to the security images on the forum.


Posted By: meteor
Date Posted: 08 January 2005 at 12:27am
coping this Movie Files may Take Several Minutes.then Your Script will Timed Out.
You Should use FSO for Coping Files.

-------------
Sincerely
--------------------
http://www.TacPlusPlus.com - PowerFull Scripts For NTTacPlus


Posted By: zMaestro
Date Posted: 08 January 2005 at 3:44pm
the files size is 1.5 MBs or less, it is supposed to be a multimedia files shared between more than a website, i just want to upload it at one place, and then all the sites copy it automatically from the storage location.


Posted By: dj air
Date Posted: 08 January 2005 at 4:14pm
if you can use the FSO you can link from the file direct and bring it in like the security images, no copying required. 


Posted By: zMaestro
Date Posted: 08 January 2005 at 5:04pm
sounds great, but I have no experience with this before...
here is the code i use:

<object id="MediaPlayer" classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" type="application/x-oleobject" standby="Loading Microsoft Windows Media Player components..." height="250" width="250">
<param name="url" value="eShop/<%=r("Video")%>">
<param name="enabled" value="-1">
<param name="playcount" value="1">
<param name="autoStart" value="1">
<param name="enableErrorDialogs" value="-1">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="currentMarker" value="0">
<param name="captioningID" value>
<param name="baseURL" value>
<param name="volume" value="100">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="invokeURLs" value="0">
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<embed TYPE="application/x-mplayer2" SRC="eShop/<%=r("Video")%>" NAME="MediaPlayer" WIDTH=250 HEIGHT=250 loop="1" playcount="1" repeat="1"><noembed>you don't have video support on your browser, please upgrade.</noembed></embed></object>
or:
http://www.megamart.com.eg/Home.asp?zPage=Systems&System=ShowRoomItem&Field=CategoryE&CatA=Computers&FieldContent=ItemE&SubA=325 - http://www.megamart.com.eg/Home.asp?zPage=Systems&System =ShowRoomItem&Field=CategoryE&CatA=Computers&Fie ldContent=ItemE&SubA=325
 
How can the video file be played from the physical path?
THanks so much


Posted By: dj air
Date Posted: 08 January 2005 at 5:29pm
set the URL to something like eshop/movie.asp?MovieID=""

get the MOVIEID to the record number for the movie and use a query to get the movie path.

then



'Set the stream object
Set objADOStream = server.createobject("ADODB.Stream")

'Open the streem oject
objADOStream.Open

'Set the stream object type to binary
objADOStream.Type = 1

'Load in the image gif
objADOStream.LoadFromFile "set path from query"



'Set the right response content type for the image
Response.ContentType = "MP3"

'Display image
Response.BinaryWrite objADOStream.Read

'Flush the response object
Response.Flush


'Clean up
objADOStream.Close
Set objADOStream=Nothing



not sure it works but that the idea




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net