Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Strange behavior using MKDIR
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Strange behavior using MKDIR
Miscellaneous
Thread ID:
01293024
Message ID:
01293024
Views:
114
I am using the MKDIR command to generate a folder structure on the server whenever the end user creates a new case in a CMS system.

It is working fine, except for this really quirky behavior. It would appear that there is no way to control the case (i.e. upper or lower case) of the folder created by MKDIR.

Here is the code I use:
   cFolder = Addbs(oApp.cDocsLoc) + "INVESTIGATIONS\" + 	;		
      AddBS(Alltrim(Str(Year(.oCaseRecord.Opendate)))) + 	;
      AddBs(.cAcronym) + AddBs(.oCaseRecord.Case_ID)
		
   cFolder = Alltrim(Upper(cFolder))
				
   Select					            ;
      wf.foldername,				   ;
      wf.category                                         ;
      From webdocfolders wf			            ;
      Where Alltrim(Upper(casetype)) == "INVESTIGATION"   ;
      Into Cursor curFolders

   Select curFolders
   Go Top
   Scan
      cNewFolder = cFolder + 		                  ;
      Upper(AddBs(Alltrim(curFolders.foldername))) +	;
      Upper(AddBs(Alltrim(curFolders.category)))
					
      cNewFolder = Alltrim(Upper(cNewFolder))
      MkDir (cNewFolder)
   EndScan		
This works, except that every other folder is lower case. What I end up with is a folder structure similar to this:
client communications - confidential
   CLIENT PROVIDED DOCUMENTS
   email
   REPORTS
   miscellaneous
   SCANS
discovery material
   CIVIL INVESTIGATION
   criminal investigations
   FINANCIAL _ CREDIT
   other
work product - confidential
   DATABASE PRODUCTS
   internal email
   INTERVIEWS
The top level folder is always lower case, but inside that folder, the rest alternate from upper to lower case. Wassup with this?

Thanks,

-Steve
Next
Reply
Map
View

Click here to load this message in the networking platform