.NETGURU
ASP.NET FSO Copyfile method?
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngfreeforall' list.


Damian Barrow
There was no copyfile method in FSO (there was move, but no copy).
Is there something now in the new improved FSO.NET?=20

I'm currently creating a folder based upon a users database name and
then their page runs based upon the folder name.

All I want to do is copy the template file tc_template.aspx to the newly
created folder... How can I do that?

I really don't fancy writelining 800 lines of code.

Cheers
Damian

Reply to this message...
 
    
Yossi Dahan
The File class has a static method called copy which copies a file from
folder a to folder b.

-----Original Message-----
From: Damian Barrow [mailto:Click here to reveal e-mail address]
Sent: Thursday, August 15, 2002 11:13 AM
To: aspngfreeforall
Subject: [aspngfreeforall] ASP.NET FSO Copyfile method??

There was no copyfile method in FSO (there was move, but no copy).
Is there something now in the new improved FSO.NET?

I'm currently creating a folder based upon a users database name and
then their page runs based upon the folder name.

All I want to do is copy the template file tc_template.aspx to the newly
created folder... How can I do that?

I really don't fancy writelining 800 lines of code.

Cheers
Damian

| ASP.net DOCS = http://www.aspng.com/docs
| [aspngfreeforall] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/aspngfreeforall = JOIN/QUIT
| news://ls.asplists.com = NEWSGROUP

Reply to this message...
 
    
Beattie, Barry
Damien:

there IS a copy in asp classic FSO...

<%
Dim fso, theCopy 'make a file object
Set fso = Server.CreateObject("Scripting.FileSystemObject")
dim yourFile: yourFile = "lightbulbs.html"
dim overwrite: overwrite = true

path_in = server.mappath("/barry/download") & "\lightbulbs2.txt"
path_out = server.mappath(yourFile)

if fso.FileExists(path_in) then '-- a bit of error checking
Set theCopy = fso.GetFile(path_in)
call theCopy.Copy(path_out, overwrite) '---------------- see?
else
strError = "Error - Source file does not exist"
end if

Set theCopy = nothing
Set fso = Nothing

if err.number > 0 then
response.write err.number & "<br>"
response.write err.description & "<br>"
else
response.write "<a href=" & yourFile & ">" _
& " click here to view your file </a>"
end if
%>

-----Original Message-----
From: Yossi Dahan [mailto:Click here to reveal e-mail address]
Sent: Thursday, 15 August 2002 8:29 PM
To: aspngfreeforall
Subject: [aspngfreeforall] RE: ASP.NET FSO Copyfile method??

The File class has a static method called copy which copies a file from
folder a to folder b.

-----Original Message-----
From: Damian Barrow [mailto:Click here to reveal e-mail address]
Sent: Thursday, August 15, 2002 11:13 AM
To: aspngfreeforall
Subject: [aspngfreeforall] ASP.NET FSO Copyfile method??

There was no copyfile method in FSO (there was move, but no copy).
Is there something now in the new improved FSO.NET?

I'm currently creating a folder based upon a users database name and
then their page runs based upon the folder name.

All I want to do is copy the template file tc_template.aspx to the newly
created folder... How can I do that?

I really don't fancy writelining 800 lines of code.

Cheers
Damian

| ASP.net DOCS = http://www.aspng.com/docs
| [aspngfreeforall] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/aspngfreeforall = JOIN/QUIT
| news://ls.asplists.com = NEWSGROUP

| ASP.net DOCS = http://www.aspng.com/docs
| [aspngfreeforall] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/aspngfreeforall = JOIN/QUIT
| news://ls.asplists.com = NEWSGROUP

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification