Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 07-11-2001, 02:13 PM   #1
Member (10 bit)
 
Join Date: May 1999
Location: Orlando, FL
Posts: 975
Send a message via ICQ to artsapimp
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.
artsapimp is offline   Reply With Quote
Old 07-12-2001, 04:42 AM   #2
SQL nutcase
 
mosquito's Avatar
 
Join Date: Sep 2000
Location: Belgium
Posts: 1,136
Send a message via AIM to mosquito
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") & "\"
and that should do the trick. make sure that your IUSR_ has permission to do all this stuff.
mosquito is offline   Reply With Quote
Old 07-12-2001, 09:07 AM   #3
Member (10 bit)
 
Join Date: May 1999
Location: Orlando, FL
Posts: 975
Send a message via ICQ to artsapimp
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"))
That is the basic idea of what I'm doing now.
artsapimp is offline   Reply With Quote
Old 07-12-2001, 02:26 PM   #4
SQL nutcase
 
mosquito's Avatar
 
Join Date: Sep 2000
Location: Belgium
Posts: 1,136
Send a message via AIM to mosquito
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.
mosquito is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 05:03 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2