Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Flex: Make Directory Problem

Status
Not open for further replies.

Rob7

Programmer
Dec 12, 2001
152
US
I have a Flex project that needs to make a folder in a file path if one does not already exist. This is for a log file function. The folder name is coming from a variable, and the MkDir command works fine except that it creates a folder name with single quotes around it. So for a folder name MYFOLDER, the actual folder in the drive directory is 'MYFOLDER'. Then when I try to create the text file using File System CreateTextFile, I get a path not found error. Is there a way to have a variable name the folder with out the quotes ending up in the folder name?

Cytec Corporation
rbrown@cyteccorp.com
 
Can you post the code you use to make the directory and especially the line that fills the variable holding the folder name to create.

I have used the mkdir(stFolder) (where stFolder is the full path and folder name to create variable), in serveral quick apps. Never had the described problem.


I would suggest though that you make a reference in you project to the Common dialog control, create an object of that type and use the common dialog control to create the folder. You can pass it the folder name to create and all teh user has to do is hit OK when the dialog appears.

Andy

Andy Baldwin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top