473,323 Members | 1,537 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,323 software developers and data experts.

File details

I am trying to make my website produce a podcast for itunes with a number of
item entries and I could really do with help with the following
practicalities.
1) How can I determine from my webpage if a particular file exists on the
server.
In VB 6 I would have used something like Set fp =
CreateObject("Scripting.FileSystemObject"): If fp.FileExists....

I need something like
If fp.FileExists(http://mysite.com/files/thisfile.mp3) Then
2) Assumeing that the file exists then I need to know its length in bytes so
I can add this information to my podcast XML file

3) I now have my basic XML file template for this file type in an SQL
database and I can load that file to a variable in VB and replace various
placeholders with the required values.

What is the syntax for saving the contents of the string variable as a
file back on the server?

Thanks for all your help

Jaez
Oct 19 '07 #1
1 1146
1) See System.IO.File.Exists if the file is local. Despiste you used a URL
as it seems you say you would do this with fso and the site is named
mysite.com I assume this is a file that is on your own server. (if a remote
file you could issue a HTTP request).

2) Same System.IO.FileInfo gives you some details such as the length

3) Not clear. See the Replace statement ? (you want to replace a know
placeholder inside a template file ?). Using a XSL stylesheet to create the
XML file from particular data could be a cleaner option (or creating the XML
directly from the SQL Server)...

"Jaez" <ja****@ntlworld.coma écrit dans le message de news:
TU****************@newsfe3-gui.ntli.net...
>I am trying to make my website produce a podcast for itunes with a number
of item entries and I could really do with help with the following
practicalities.
1) How can I determine from my webpage if a particular file exists on the
server.
In VB 6 I would have used something like Set fp =
CreateObject("Scripting.FileSystemObject"): If fp.FileExists....

I need something like
If fp.FileExists(http://mysite.com/files/thisfile.mp3) Then
2) Assumeing that the file exists then I need to know its length in bytes
so I can add this information to my podcast XML file

3) I now have my basic XML file template for this file type in an SQL
database and I can load that file to a variable in VB and replace various
placeholders with the required values.

What is the syntax for saving the contents of the string variable as a
file back on the server?

Thanks for all your help

Jaez

Oct 19 '07 #2

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

Similar topics

2
by: DonMiche | last post by:
I'm having trouble producing an xml output from another xml file using xsl. The proper values are output to the browser as text with no formating or xml tags (<rowset> and <row>). Any ideas? ...
1
by: norwich | last post by:
Hi, I'm trying to display customer details on screen from a file using functions. The details are written to the file first then I display them on screen after I search for the file. My...
3
by: maw | last post by:
Hi, could somebody point me in the right direction for adding, removing and modifying nodes in an xml file programatically using vb.net (.net framework 2.0)? I have an xml file in the following...
13
DOSrelic
by: DOSrelic | last post by:
I have an assignment program that uses an array of images that are created from a supporting resource folder but I wish to incorporate them into the final exe file so how do I make an array from the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.