AUTO-CREATE A DIRECTORY WITH IMAGE UPLOAD (PURE ASP UPLOAD).

Hello.  I am using ASP VBSCRIPT (not .NET).
I am also using an upload extension name PURE ASP UPLOAD.

I know this is a particular brand, but I wanted to know if someone could help me manipulate the upload code just a little.  It seems it may be simple, but I'm not certain.

This upload extension will provide the code to auto-create a directory upon upload, if the directory does not already exist.  It works fine with one directory; however, I would like to auto-create a directory within a directory.  I pasted the code below, and the path has the directory/directories pulling from 2 form menu fields.  The syntax is probably what I'm not entering correctly.  As it is, it uploads, but only creates one directory while combining both record numbers together as the directory name.

(Example: When only uploading one directory, the correct result would be that the directory would be named whatever the "value" of the form field is.  In this case, the "category" field has a value of the Record number (1, 2, etc.).  I'm trying to create ANOTHER directory within that directory, with the same naming scheme.  So, it should upload and create the first directory with a name from the "value" being (1, 2, 3, etc.), then the 2nd directory would be named the "value" of the "subcategory" field (1, 2, 3, etc.).  As it is listed below, it combines the 2 "values" to create one name for the one directory.  

If the "value" from the menu field "category" is "5" and the "value" for the "subcategory" menu field is "1", it creates one directory named "51".)

I thought perhaps someone could, possibly, know how ASP does this and would be able to assist me with altering the code.

Here's the code: (I separated the "path" line from the rest for easier visibility).
--------------------------------------------------------------------------------------------------------------------------------------------
<%
'*** Pure ASP File Upload 2.2.1
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload")) <> "") Then
  Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,pau_progressHeight


 
pau_thePath = """../images/scapeImages/"" & UploadFormRequest(""category"") & UploadFormRequest(""subcategory"")"



  pau_Extensions = "GIF,JPG,JPEG,BMP,PNG"
  pau_Form = "form1"
  pau_Redirect = ""
  pau_storeType = "path"
  pau_sizeLimit = ""
  pau_nameConflict = "over"
  pau_requireUpload = "true"
  pau_minWidth = ""
  pau_minHeight = "" 
  pau_maxWidth = ""
  pau_maxHeight = ""
  pau_saveWidth = ""
  pau_saveHeight = ""
  pau_timeout = "600"
  pau_progressBar = "showProgress.htm"
  pau_progressWidth = "300"
  pau_progressHeight = "100"
 
  Dim RequestBin, UploadRequest
  CheckPureUploadVersion 2.21
  ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout
end if
%>

--------------------------------------------------------------------------------------------------------------------------------------------

Thanks so much.
lshaneAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

sybeCommented:
> If the "value" from the menu field "category" is "5" and the "value" for the "subcategory" menu field is "1", it creates one directory named "51".)

So if the value from the category is "11" and the value from the subcategory is "2" it creates a directory named "112"
And if the value of the category is "1" and the value of the subcategory is "12", it creates a directory named......: yes "112"

You'll get in trouble with this system.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
lshaneAuthor Commented:
Understood.  I'll construct a different method.  Perhaps I'll just the uniqued ID the "name" of the category and/or subcategory.  I'm just afraid the user may create a typo and, thus, created another directory.

Maybe I'll just hold to ONE main directory for "Category" and list all associated "Sub Category" images in there.

Would you think that to be better?
0
lshaneAuthor Commented:
Thanks, sybe.  I changed my system.  Works much better.  Thank you.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.