473,662 Members | 2,352 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to manipulate files on the server side

Tim
I need to manipulate files (rtf and wav files) on the server side. Can you
show me how to do that?
Thank you,
Oct 3 '05 #1
6 1873
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.publi c.inetserver.as p.general:
I need to manipulate files (rtf and wav files) on the server side. Can
you show me how to do that?


You mean like creating, deleting, moving, copying?

see the faq:

"Scripting.File SystemObject"

<http://www.aspfaq.com/show.asp?id=221 1>
<http://www.aspfaq.com/show.asp?id=217 0>
etc.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 3 '05 #2
Tim
Thank you for your response. No, I don't mean to creating, deleting...I have
rtf and wav files on the server and the users will access these files. What
is the code for showing the map path for them to access these files? And how
these files are shown up on the web browser.
Thank you.

"Evertjan." wrote:
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.publi c.inetserver.as p.general:
I need to manipulate files (rtf and wav files) on the server side. Can
you show me how to do that?


You mean like creating, deleting, moving, copying?

see the faq:

"Scripting.File SystemObject"

<http://www.aspfaq.com/show.asp?id=221 1>
<http://www.aspfaq.com/show.asp?id=217 0>
etc.

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 3 '05 #3
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.publi c.inetserver.as p.general:
"Evertjan." wrote:
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.publi c.inetserver.as p.general:
> I need to manipulate files (rtf and wav files) on the server side.
> Can you show me how to do that?
>
You mean like creating, deleting, moving, copying?

see the faq:

"Scripting.File SystemObject"

<http://www.aspfaq.com/show.asp?id=221 1>
<http://www.aspfaq.com/show.asp?id=217 0>
etc.


[please do not toppost on usenet]
Thank you for your response. No, I don't mean to creating,
deleting...I have rtf and wav files on the server and the users will
access these files. What is the code for showing the map path for them
to access these files? And how these files are shown up on the web
browser. Thank you.


If they are in the scope of the www root you can just use them:

<img src='/mydir/mysubdir/mypic.jpg'>

if they are not, you can move them by hand.

If you do not want them in he scope, you can fetch them:

<img src='/mydir/fetchMe.asp'>

where /mydir/fetchMe.asp is:

<%
outputJPG("mypi c.jpg")
function outputJPG(x)

strFileName="c: \noScopedir\" & x
strFilePath=ser ver.mappath(str Filename)

Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
if objFSO.FileExis ts(strFilePath) then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open

objStream.Type = 1
objStream.LoadF romFile strFilePath

Response.Buffer = false
Response.Conten tType = ""
Response.AddHea der "Content-Type", "image/Jpeg"

Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
else
response.write "None existing"
end if
Set objFSO = Nothing

Response.end
end function
%>


--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 3 '05 #4
Tim
In your code, it deals with .jpg picture file. I assume it would work with
rtf and wav (sound file), too. I will check...
Again, thank you for your help. I appreciate it.
Tim.

"Evertjan." wrote:
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.publi c.inetserver.as p.general:
"Evertjan." wrote:
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.publi c.inetserver.as p.general:

> I need to manipulate files (rtf and wav files) on the server side.
> Can you show me how to do that?
>

You mean like creating, deleting, moving, copying?

see the faq:

"Scripting.File SystemObject"

<http://www.aspfaq.com/show.asp?id=221 1>
<http://www.aspfaq.com/show.asp?id=217 0>
etc.


[please do not toppost on usenet]
Thank you for your response. No, I don't mean to creating,
deleting...I have rtf and wav files on the server and the users will
access these files. What is the code for showing the map path for them
to access these files? And how these files are shown up on the web
browser. Thank you.


If they are in the scope of the www root you can just use them:

<img src='/mydir/mysubdir/mypic.jpg'>

if they are not, you can move them by hand.

If you do not want them in he scope, you can fetch them:

<img src='/mydir/fetchMe.asp'>

where /mydir/fetchMe.asp is:

<%
outputJPG("mypi c.jpg")
function outputJPG(x)

strFileName="c: \noScopedir\" & x
strFilePath=ser ver.mappath(str Filename)

Set objFSO = Server.CreateOb ject("Scripting .FileSystemObje ct")
if objFSO.FileExis ts(strFilePath) then
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open

objStream.Type = 1
objStream.LoadF romFile strFilePath

Response.Buffer = false
Response.Conten tType = ""
Response.AddHea der "Content-Type", "image/Jpeg"

Response.Binary Write objStream.Read
Response.Flush
objStream.Close
Set objStream = Nothing
else
response.write "None existing"
end if
Set objFSO = Nothing

Response.end
end function
%>


--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 3 '05 #5
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.publi c.inetserver.as p.general:

"Evertjan." wrote:
Response.AddHea der "Content-Type", "image/Jpeg"
In your code, it deals with .jpg picture file. I assume it would work
with rtf and wav (sound file), too. I will check...
Again, thank you for your help. I appreciate it.
Tim.


With the right "Content-Type" it should.

<http://reliableanswers .com/contenttype/CType.asp>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 3 '05 #6
Tim
That's wonderful! Thank you for your helpful link.
Tim

"Evertjan." wrote:
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.publi c.inetserver.as p.general:

"Evertjan." wrote:
Response.AddHea der "Content-Type", "image/Jpeg"

In your code, it deals with .jpg picture file. I assume it would work
with rtf and wav (sound file), too. I will check...
Again, thank you for your help. I appreciate it.
Tim.


With the right "Content-Type" it should.

<http://reliableanswers .com/contenttype/CType.asp>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Oct 5 '05 #7

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

Similar topics

3
4512
by: Anonymous | last post by:
I need to create an application that will do fairly simple text manipulation on 20,000 files in text format (html files). The files exist both on my Windows machine and on a FreeBSD server. I prefer to do the manipulation on my machine where it's easier to create backup copies, recover from programming errors and so on, then upload the files to the server. All I'm doing is extracting certain elements from each file and creating a different...
1
4614
by: Dole | last post by:
We have a problem with caching of js Files in our application. The situation is that in some location our application is not running well - the problem we identified was that not the actual js is used in these problem locations. We are using jsp and external javascript files. We have configured our webserver to insert into the http header cach-control and pragma - both parameters with no header. My problem is now that in we identified...
5
2555
by: Noorul Ameen | last post by:
Dear Folks, In a HTML page I want to get all the files in a selected dirs. Is that any way to do this thru javascript. Help will be highly appreciated. Thanks in advance. Regards, Ameen T
2
2246
by: Jeff | last post by:
Can I manipulate the properties of pure HTML controls (i.e. not server side controls) from my aspx.cs Page_Load event? If so, I don't see the control listed by intellisense. I gave the control a unique ID to boot. Is what I'm trying impossible unless you are using a server side control? Thanks
2
2040
by: cedced | last post by:
Hello, is it possible to access client files in VB.NET? What? I have doing that but it isn't good (VB.NET take file on pc server and not on pc client): (thanks) Dim fichier As StreamReader Dim name As String
4
2136
by: Weston Weems | last post by:
I've got the simple problem where I'd like to transfer somewhat large files to my webserver via http/webservice/something like that. My question is what kinda limits have people been able to hit? Is 500mb unreasonable or not. Client doesnt have to be a typical webbrowser, so I could theoretically chunk it up and send chunks to the server, when completed, re- assemble and write file etc.
2
1203
by: Olivier Matrot | last post by:
Hello, I'm looking for a tool that is able to manipulate aspx source files (specifically <asp:datagrid> ) out of Visual Studio. The goal is to give aspx file to a web designer in order for him to acomodate our corporate web site design. This tool must know the HMTL rendering of standard server controls.
5
2272
by: Pilence | last post by:
Hy!! Can someone tell me please how to do this type of work done by using C#......
2
16795
yashg
by: yashg | last post by:
I am building a data backup application in C# using Sockets. It has a server component and a client component. The client is going to upload files to the server through TCP sockets. I've got all figured out and have been able to transfer files between client and server. Now I have some doubts about which is the best method to transfer a file? Option 1 - I use the built in Socket.BeginSendFile (I am using async calls) to transfer a file. Option 2...
0
8432
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8545
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7365
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5653
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1992
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1747
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.