473,466 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Just wondering

Just wondering if it would be possible to convert an existing e-mail form
to;

1. Send the e-mail (as it does now...without problems)
2. Copy one folder on the server, to another new folder

Using the username from the e-mail form, as the new foldername?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)

Jul 19 '05 #1
11 2192
As long as you have access to the ASP file that's doing these things, sure,
why not?

Ray at work

"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP10.phx.gbl...
Just wondering if it would be possible to convert an existing e-mail form
to;

1. Send the e-mail (as it does now...without problems)
2. Copy one folder on the server, to another new folder

Using the username from the e-mail form, as the new foldername?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)

Jul 19 '05 #2
Cheers Ray.

I'm just doing a quick search on aspfaq.com to see if I can find any info
(it not only has to copy the folder, but all contents, including
sub-folders..... which is proving to be a nightmare when using the
Server.MapPath string).

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Ray at <%=sLocation%> <myfirstname at lane34 dot com> wrote in message
news:u3**************@TK2MSFTNGP09.phx.gbl...
As long as you have access to the ASP file that's doing these things, sure, why not?

Ray at work

"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP10.phx.gbl...
Just wondering if it would be possible to convert an existing e-mail form to;

1. Send the e-mail (as it does now...without problems)
2. Copy one folder on the server, to another new folder

Using the username from the e-mail form, as the new foldername?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Jul 19 '05 #3
Below is the code I am trying to use to copy the folder; (constantly gives
"file not found")

'BEGIN CODE

Dim FSO
Dim fldr
Dim strName
strName = Trim(Request.Form("username"))

Set FSO = CreateObject("Scripting.FileSystemObject")

'Doesn't seem to work either
' If FolderExists(Server.MapPath("\htdocs\users\") & strName) = True Then

If FolderExists(Server.MapPath("users\") & strName) = True Then
Response.Redirect "error.asp"
Else
Set fldr = FSO.CopyFolder(Server.MapPath("temp"),
Server.MapPath("users\") & strName)
End If

'Originally VB code, but tried to convert it to work with ASP aswell (not
sure if it works due to the above issue)
Public Function FolderExists(sFileName)
If IsNothing(sFileName) Then
FolderExists = False
Exit Function
End If
If Len(FSO.GetFolder(sFileName)) Then
FolderExists = True
Else
FolderExists = False
End If
End Function

Public Function IsNothing(sWhat)
If Len(Trim(sWhat)) = 0 Then
IsNothing = True
Else
IsNothing = False
End If
End Function

Set FSO = Nothing
Set fldr = Nothing

'END CODE

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Steven Burn <nobody@PVT_it-mate.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP10.phx.gbl...
Just wondering if it would be possible to convert an existing e-mail form
to;

1. Send the e-mail (as it does now...without problems)
2. Copy one folder on the server, to another new folder

Using the username from the e-mail form, as the new foldername?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)

Jul 19 '05 #4
> Set fldr = FSO.CopyFolder(Server.MapPath("temp"),
Server.MapPath("users\") & strName)


CopyFolder takes a destination folder, not the name you want it to take.
Also, there is nothing to assign to the results. Try the following:

FSO.CopyFolder Server.MapPath("temp"), Server.MapPath("users/")

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #5
The CopyFolder method of the FSO copies contents. See here.
http://msdn.microsoft.com/library/en...CopyFolder.asp

Ray at work
"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:uH**************@TK2MSFTNGP09.phx.gbl...
Cheers Ray.

I'm just doing a quick search on aspfaq.com to see if I can find any info
(it not only has to copy the folder, but all contents, including
sub-folders..... which is proving to be a nightmare when using the
Server.MapPath string).

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Ray at <%=sLocation%> <myfirstname at lane34 dot com> wrote in message
news:u3**************@TK2MSFTNGP09.phx.gbl...
As long as you have access to the ASP file that's doing these things,

sure,
why not?

Ray at work

"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP10.phx.gbl...
Just wondering if it would be possible to convert an existing e-mail form to;

1. Send the e-mail (as it does now...without problems)
2. Copy one folder on the server, to another new folder

Using the username from the e-mail form, as the new foldername?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)



Jul 19 '05 #6
So, if you need it to take on strName, I think you will need to use
MoveFolder method after it has been copied.

Or, just use the MoveFolder method, and then CreateFolder to rebuild the
temp folder, I guess...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #7
http://msdn.microsoft.com/library/de...us/script56/ht
ml/jsmthFolderExists.asp

I've got the following to create the folder, no problem. However, I am
having a problem.

First of all, I tried the FolderExists code at MSDN (see URL above), to try
and get it to re-direct to error.asp if the folder exists, but it doesn't
appear to work. Anyone have any ideas on how to convert the below to check
if the folder exists, and if it does, re-direct it to the error.asp page?

'BEGIN CODE
Dim FSO
Dim fldr
Dim strName
strName = Trim(Request.Form("username"))
Set FSO = CreateObject("Scripting.FileSystemObject")

ReportFolderStatus Server.MapPath("users" & "\" & strName)

Function ReportFolderStatus(fldr)
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(fldr)) Then
response.redirect "error.asp"
Else
Set fldr = FSO.CreateFolder(Server.MapPath("users" & "\" & strName))
FSO.CopyFolder Server.MapPath("temp"), fldr.Path
End If
ReportFolderStatus = msg
End Function

Set FSO = Nothing
Set fldr = Nothing

'END CODE

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Steven Burn <nobody@PVT_it-mate.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP10.phx.gbl...
Just wondering if it would be possible to convert an existing e-mail form
to;

1. Send the e-mail (as it does now...without problems)
2. Copy one folder on the server, to another new folder

Using the username from the e-mail form, as the new foldername?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)

Jul 19 '05 #8
> If (fso.FolderExists(fldr)) Then

Come on now, where do you define fldr? What happens when you do

response.write "fldr = " & fldr: response.end

?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #9
ReportFolderStatus Server.MapPath("users" & "\" & strName) 'fldr path and
name

When doing a Response.Write on the above (fldr), it shows the path as it
should be, without any problems.

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Aaron Bertrand - MVP <aa***@TRASHaspfaq.com> wrote in message
news:eT**************@TK2MSFTNGP12.phx.gbl...
If (fso.FolderExists(fldr)) Then


Come on now, where do you define fldr? What happens when you do

response.write "fldr = " & fldr: response.end

?

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/

Jul 19 '05 #10
> ReportFolderStatus Server.MapPath("users" & "\" & strName) 'fldr path and
name

When doing a Response.Write on the above (fldr), it shows the path as it
should be, without any problems.


You're confusing me. The above is not represented anywhere by the variable
named fldr ...

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/
Jul 19 '05 #11
Thanks everyone but...... I've solved it (for now). Modified the code to the
below;

'BEGIN CODE
Dim FSO
Dim fldr
Dim strName
strName = Trim(Request.Form("username"))

If ReportFolderStatus(Server.MapPath("users" & "\" & strName)) = "1" Then
Response.Redirect "error.asp"
Else
Set fldr = FSO.CreateFolder(Server.MapPath("users" & "\" & strName))
FSO.CopyFolder Server.MapPath("temp"), fldr.Path
End If

Function ReportFolderStatus(fldr)
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(fldr)) Then
msg = "1" 'True
Else
msg = "0" 'False
End If
ReportFolderStatus = msg
End Function

Set FSO = Nothing
Set fldr = Nothing

'END CODE
--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Steven Burn <nobody@PVT_it-mate.co.uk> wrote in message
news:OZ**************@tk2msftngp13.phx.gbl...
http://msdn.microsoft.com/library/de...us/script56/ht ml/jsmthFolderExists.asp

I've got the following to create the folder, no problem. However, I am
having a problem.

First of all, I tried the FolderExists code at MSDN (see URL above), to try and get it to re-direct to error.asp if the folder exists, but it doesn't
appear to work. Anyone have any ideas on how to convert the below to check
if the folder exists, and if it does, re-direct it to the error.asp page?

'BEGIN CODE
Dim FSO
Dim fldr
Dim strName
strName = Trim(Request.Form("username"))
Set FSO = CreateObject("Scripting.FileSystemObject")

ReportFolderStatus Server.MapPath("users" & "\" & strName)

Function ReportFolderStatus(fldr)
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(fldr)) Then
response.redirect "error.asp"
Else
Set fldr = FSO.CreateFolder(Server.MapPath("users" & "\" & strName)) FSO.CopyFolder Server.MapPath("temp"), fldr.Path
End If
ReportFolderStatus = msg
End Function

Set FSO = Nothing
Set fldr = Nothing

'END CODE

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Steven Burn <nobody@PVT_it-mate.co.uk> wrote in message
news:Oh**************@TK2MSFTNGP10.phx.gbl...
Just wondering if it would be possible to convert an existing e-mail form to;

1. Send the e-mail (as it does now...without problems)
2. Copy one folder on the server, to another new folder

Using the username from the e-mail form, as the new foldername?

--

Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Jul 19 '05 #12

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

Similar topics

2
by: KevinGPO | last post by:
Just wondering if anyone knows if there are converters to convert from: MS Visual C++ 6.0 or MS Visual Studio 2003 project files into UNIX autogen/configure/make files?
13
by: jm | last post by:
I am trying to use datepart to get the real name of the month like "April" or "APR" not just "4." I could not find it in the documentation. Sorry. Thank you.
8
by: MLH | last post by:
A97 HELP shows the proper syntax for using Nz as Nz(variant) I'm wondering what to expect from potential past misuse I've made. For example, consider the following... Private Sub...
3
by: rodchar | last post by:
hey all, i was wondering why I've seen articles similar to the following: ADO.NET Code Generator - Map DataBase Objects To .NET Classes What does this subject accomplish? Like, this does...
16
by: rodchar | last post by:
Hello all, Please allow me to revisit this topic once more it has hindered me for the longest. Even after the great replies I got in the past. I guess they might have been a bit over my head or...
8
by: rodchar | last post by:
hey all, i'm using method webclient.filedownload to automatically download a file from an internet site. that works great. well i was wondering if there was a way to monitor or check if that...
2
by: DoomedLung | last post by:
I've been reading the DHTML Reference (2nd edt.) book by Danny Goodman. I've come to a point in the book where my scripting experience isn't that great to understand some of the coding examples and...
5
Nert
by: Nert | last post by:
hi, I've created a website, uhhmmn something like posting/uploading images and videos.., i made my site working well, i save images on database but the videos are just copied from the client...
42
by: lorlarz | last post by:
Contrary to what one authority in the JavaScript field says: JavaScript does make errors when dealing with just with integers. This authority (Douglas Crockford.) says: "integer arithmetic in...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
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
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
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,...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...

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.