|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (10 bit)
|
ASP and File System Object and copying files and....
How can I create a form that will make a new folder named whatever I type in a textbox and copies some files from another location to the new folder? Confusing? Let me try again.
You type "Frank" as the name in a textbox and click continue. The next page creates a folder named "Frank" in a specified directory on the server and copies files from another folder "RootFiles" to the "Frank" folder. I'm not very good at explaining it, I'm sorry. Thanks for your help. |
|
|
|
|
|
#2 |
|
SQL nutcase
|
very simple.
in your asp code you use Code:
'create folder
mkdir "c:\data\" & request("path")
'copy files
filecopy "c:\data\*.*", "c:\data\" & request("path") & "\"
|
|
|
|
|
|
#3 |
|
Member (10 bit)
|
Thank you.
After searching the internet for almost forever I found the FSO commands which make the folders and copy other folders. Is this the right way to do things or is the way you explained a better way?
Code:
Fso.CreateFolder(Server.MapPath("users/" & Request.Form("AccountName"))
Fso.CopyFolder Server.MapPath("users/RootFolder"), Server.MapPath("users/" & Request.Form("AccountName"))
|
|
|
|
|
|
#4 |
|
SQL nutcase
|
Both are good. The method I described uses the integrated functions (classic) from the vb runtime, your method uses the fs object. Both methods work, they just use another approach.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|