473,406 Members | 2,769 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,406 software developers and data experts.

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 1863
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.public.inetserver.asp.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.FileSystemObject"

<http://www.aspfaq.com/show.asp?id=2211>
<http://www.aspfaq.com/show.asp?id=2170>
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.public.inetserver.asp.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.FileSystemObject"

<http://www.aspfaq.com/show.asp?id=2211>
<http://www.aspfaq.com/show.asp?id=2170>
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.public.inetserver.asp.general:
"Evertjan." wrote:
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.public.inetserver.asp.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.FileSystemObject"

<http://www.aspfaq.com/show.asp?id=2211>
<http://www.aspfaq.com/show.asp?id=2170>
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("mypic.jpg")
function outputJPG(x)

strFileName="c:\noScopedir\" & x
strFilePath=server.mappath(strFilename)

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.FileExists(strFilePath) then
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open

objStream.Type = 1
objStream.LoadFromFile strFilePath

Response.Buffer = false
Response.ContentType = ""
Response.AddHeader "Content-Type", "image/Jpeg"

Response.BinaryWrite 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.public.inetserver.asp.general:
"Evertjan." wrote:
=?Utf-8?B?VGlt?= wrote on 03 okt 2005 in
microsoft.public.inetserver.asp.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.FileSystemObject"

<http://www.aspfaq.com/show.asp?id=2211>
<http://www.aspfaq.com/show.asp?id=2170>
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("mypic.jpg")
function outputJPG(x)

strFileName="c:\noScopedir\" & x
strFilePath=server.mappath(strFilename)

Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
if objFSO.FileExists(strFilePath) then
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open

objStream.Type = 1
objStream.LoadFromFile strFilePath

Response.Buffer = false
Response.ContentType = ""
Response.AddHeader "Content-Type", "image/Jpeg"

Response.BinaryWrite 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.public.inetserver.asp.general:

"Evertjan." wrote:
Response.AddHeader "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.public.inetserver.asp.general:

"Evertjan." wrote:
Response.AddHeader "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
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...
1
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...
5
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
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...
2
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 ...
4
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...
2
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...
5
by: Pilence | last post by:
Hy!! Can someone tell me please how to do this type of work done by using C#......
2
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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...

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.