473,226 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,226 software developers and data experts.

file exists on remote server

Currently we have a site that allows users to listen to mp3 files. It
is creating bandwidth issues. So we want to move the mp3 files to an
ISP that caps bandwidth usage. Ours is currently burstable.

Now I am able to do the following:
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.fileExists(music_file) Then
'show music file
Else
'do not show a link for file
End If
set fs = nothing

Is it possible to do the same thing, but on a remote server?

Thanks.

Jul 19 '05 #1
6 8688
This question has been asked at least twice in the last 24 hours in this
group.
See: "copy files on network" posted by Marjus Weber and \\share\directory\
posted by Ed

Cheers
Ken

"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
Currently we have a site that allows users to listen to mp3 files. It
is creating bandwidth issues. So we want to move the mp3 files to an
ISP that caps bandwidth usage. Ours is currently burstable.

Now I am able to do the following:
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.fileExists(music_file) Then
'show music file
Else
'do not show a link for file
End If
set fs = nothing

Is it possible to do the same thing, but on a remote server?

Thanks.

Jul 19 '05 #2
Thanks Ken.

Maybe I am mistaken, but they are talking about servers within their domain.
I am trying to see if a file exists on a remote server outside our domain.

Anyone have some ideas???

Ken Schaefer wrote:
This question has been asked at least twice in the last 24 hours in this
group.
See: "copy files on network" posted by Marjus Weber and \\share\directory\
posted by Ed

Cheers
Ken

"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
Currently we have a site that allows users to listen to mp3 files. It
is creating bandwidth issues. So we want to move the mp3 files to an
ISP that caps bandwidth usage. Ours is currently burstable.

Now I am able to do the following:
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.fileExists(music_file) Then
'show music file
Else
'do not show a link for file
End If
set fs = nothing

Is it possible to do the same thing, but on a remote server?

Thanks.


Jul 19 '05 #3
if you dont have file level access then no, you cant.

--
Curt Christianson
Owner/Lead Developer, DF-Software
Site: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
Thanks Ken.

Maybe I am mistaken, but they are talking about servers within their
domain.
I am trying to see if a file exists on a remote server outside our domain.

Anyone have some ideas???

Ken Schaefer wrote:
This question has been asked at least twice in the last 24 hours in this
group.
See: "copy files on network" posted by Marjus Weber and
\\share\directory\
posted by Ed

Cheers
Ken

"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
> Currently we have a site that allows users to listen to mp3 files. It
> is creating bandwidth issues. So we want to move the mp3 files to an
> ISP that caps bandwidth usage. Ours is currently burstable.
>
> Now I am able to do the following:
> Set fs = CreateObject("Scripting.FileSystemObject")
> If fs.fileExists(music_file) Then
> 'show music file
> Else
> 'do not show a link for file
> End If
> set fs = nothing
>
> Is it possible to do the same thing, but on a remote server?
>
> Thanks.
>

Jul 19 '05 #4
If the files will under a web-server on the remote server (you can download
them directly using URLs) then you can do a HEAD request and see if it
exists (and possibly how large it is).

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
<%@ LANGUAGE="VBSCRIPT"%>
<%
'check to see if url returns a file
'
option explicit

dim xmlhttp
dim targetsite
dim targeturl

Response.ContentType = "text/plain"
Response.Buffer = false

targetsite="http://www.ielearning.com/"
targeturl = targetsite & "i/wbtmanlogo.gif"

'get a component that can do a HEAD request
'for Windows NT this component may be downloaded at www.microsoft.com/xml
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")

'************************
'See if the target url exist
'************************
xmlhttp.open "HEAD", targeturl, false

'send HEAD request
xmlhttp.send

Response.Write xmlhttp.status & " - " & xmlhttp.statusText & vbCrlf
Response.Write xmlhttp.getAllResponseHeaders

%>

Returns:

200 - OK
Server: Microsoft-IIS/4.0
Connection: keep-alive
Date: Thu, 16 Sep 2004 15:08:44 GMT
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Wed, 15 Sep 2004 20:58:36 GMT
ETag: "8092b0c4669bc41:5cc3"
Content-Length: 2417
"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
Thanks Ken.

Maybe I am mistaken, but they are talking about servers within their domain. I am trying to see if a file exists on a remote server outside our domain.

Anyone have some ideas???

Ken Schaefer wrote:
This question has been asked at least twice in the last 24 hours in this
group.
See: "copy files on network" posted by Marjus Weber and \\share\directory\ posted by Ed

Cheers
Ken

"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
Currently we have a site that allows users to listen to mp3 files. It
is creating bandwidth issues. So we want to move the mp3 files to an
ISP that caps bandwidth usage. Ours is currently burstable.

Now I am able to do the following:
Set fs = CreateObject("Scripting.FileSystemObject")
If fs.fileExists(music_file) Then
'show music file
Else
'do not show a link for file
End If
set fs = nothing

Is it possible to do the same thing, but on a remote server?

Thanks.

Jul 19 '05 #5
Thank you very much Mark!!!

That is exactly what I needed :)
Mark Schupp wrote:
If the files will under a web-server on the remote server (you can download
them directly using URLs) then you can do a HEAD request and see if it
exists (and possibly how large it is).

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com

<%@ LANGUAGE="VBSCRIPT"%>
<%
'check to see if url returns a file
'
option explicit

dim xmlhttp
dim targetsite
dim targeturl

Response.ContentType = "text/plain"
Response.Buffer = false

targetsite="http://www.ielearning.com/"
targeturl = targetsite & "i/wbtmanlogo.gif"

'get a component that can do a HEAD request
'for Windows NT this component may be downloaded at www.microsoft.com/xml
set xmlhttp = server.CreateObject("MSXML2.ServerXMLHTTP")

'************************
'See if the target url exist
'************************
xmlhttp.open "HEAD", targeturl, false

'send HEAD request
xmlhttp.send

Response.Write xmlhttp.status & " - " & xmlhttp.statusText & vbCrlf
Response.Write xmlhttp.getAllResponseHeaders

%>

Returns:

200 - OK
Server: Microsoft-IIS/4.0
Connection: keep-alive
Date: Thu, 16 Sep 2004 15:08:44 GMT
Content-Type: image/gif
Accept-Ranges: bytes
Last-Modified: Wed, 15 Sep 2004 20:58:36 GMT
ETag: "8092b0c4669bc41:5cc3"
Content-Length: 2417

"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
Thanks Ken.

Maybe I am mistaken, but they are talking about servers within their

domain.
I am trying to see if a file exists on a remote server outside our domain.

Anyone have some ideas???

Ken Schaefer wrote:
This question has been asked at least twice in the last 24 hours in this
group.
See: "copy files on network" posted by Marjus Weber and \\share\directory\ posted by Ed

Cheers
Ken

"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
> Currently we have a site that allows users to listen to mp3 files. It
> is creating bandwidth issues. So we want to move the mp3 files to an
> ISP that caps bandwidth usage. Ours is currently burstable.
>
> Now I am able to do the following:
> Set fs = CreateObject("Scripting.FileSystemObject")
> If fs.fileExists(music_file) Then
> 'show music file
> Else
> 'do not show a link for file
> End If
> set fs = nothing
>
> Is it possible to do the same thing, but on a remote server?
>
> Thanks.
>


Jul 19 '05 #6
Do you have some kind of file share access between the two? If so then:
a) create an account on the fileserver (serverB) that has the same name and
password as the process identity on ServerA (IIS Server)
b) create a share that has appropriate permissions for this account
c) ensure that you aren't restricting authentication to Kerberos only (ie
NTLM or LanMan is required)

Cheers
Ken

"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
Thanks Ken.

Maybe I am mistaken, but they are talking about servers within their
domain.
I am trying to see if a file exists on a remote server outside our domain.

Anyone have some ideas???

Ken Schaefer wrote:
This question has been asked at least twice in the last 24 hours in this
group.
See: "copy files on network" posted by Marjus Weber and
\\share\directory\
posted by Ed

Cheers
Ken

"Jennifer Smith" <je******@nospam.com> wrote in message
news:41***************@nospam.com...
> Currently we have a site that allows users to listen to mp3 files. It
> is creating bandwidth issues. So we want to move the mp3 files to an
> ISP that caps bandwidth usage. Ours is currently burstable.
>
> Now I am able to do the following:
> Set fs = CreateObject("Scripting.FileSystemObject")
> If fs.fileExists(music_file) Then
> 'show music file
> Else
> 'do not show a link for file
> End If
> set fs = nothing
>
> Is it possible to do the same thing, but on a remote server?
>
> Thanks.
>

Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Kevin Forbes | last post by:
Hi there, When importing a text file using SQL Server, how do I specify the path to a file on the same remote server that SQL Server is running on? I tried //c:/filename but that doesn't seem to...
5
by: kevin | last post by:
Hi, Any help with this would be really appreciated! I'm trying to download a file from a remote server. The access permissions is okay but the problem I'm facing is that the file is getting...
1
by: John Grandy | last post by:
How to remove "Read Only" status on a file on a remote server? My goal is to delete the file, but System.File.Delete(\\machine1\c$\folder1\file1.txt) is giving me an "Access is denied"...
2
by: Glen Conway | last post by:
Hi, I am trying to get the contents of a file in a hidden share on a remote server, something like '\\server.domain.com\c$\program files\application\document.xml'. When I try any of the...
2
by: olekribu | last post by:
Hi! I'm struggling with the following scenario: I want my asp.net application to be able to create and write to a specific file on a remote file server from a web server. Both servers have...
1
by: AtulTiwari | last post by:
I know that I AM HERE again for this discussion but what can i do? I am very much frustrated that i can't be able to send or post the file to remote server. So can any one Explain me that how can...
1
by: Dineshms | last post by:
Hi I am trying to upload a file to a remote server. But at the line Stream inStream = Request.InputStream, I am getting the length of stream 0, although file is stored in local server as...
2
by: MarkusJ_NZ | last post by:
Hi, I am using python to FTP into a remote server and copy a file to a local machine. After I have downloaded the file I would like to move the file on the remote server to an archive directory....
3
by: neovantage | last post by:
Hey all, I am badly stuck in a problem while zip any file on remote server. Is there any option in PHP that i can zip files on remote server through PHP script which execute on same server and zip...
0
by: ivan lim | last post by:
I'm trying to copy a file from remote server which installed freesshd with public/private key authentication, how could i write a function in VB6 or any windows API to lauch psftp (sftp command-line)...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.