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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

FPD 2.5b and Extended Error 183 when creating a directory

Status
Not open for further replies.

Goofus828

Programmer
Nov 9, 2005
127
US
I'm trying to create a directory underneath my executable using this as my code RUN MD hipaa837 and I get

Extended error 183.

Where my exe is 3 folders off of the root and they are long file names so the path looks like this \ononda~1\ONON03~1\KIDS\.

I'm running this on XP but could be 3.1,ME,98,2000
WOuld i be better off doing an fcreate of a batch file to create the new directory?
Thanks
 
WOuld i be better off doing an fcreate of a batch file to create the new directory?

You can do it in three lines with the File System Object:

Code:
local fso as scripting.filesystemobject
fso=createobject("scripting.filesystemobject")
fso.CreateFolder("c:\my new folder")

If you want to create a tree of folders you have to do it in steps so as each command has something to build on:

Code:
local fso as scripting.filesystemobject
fso=createobject("scripting.filesystemobject")
fso.CreateFolder("c:\another new folder")
fso.CreateFolder("c:\another new folder\and another one")

Geoff Franklin
 
Geoff, thanks but I'm in foxpro for dos version 2.5b and this is a visual solution correct?
 
Geoff, thanks but I'm in foxpro for dos version 2.5b and this is a visual solution correct?

My mistake. You could I suppose call a VBScript program from FPW but it's a bit of a long way round. The VBScript code is very similar to the VFP:

Code:
dim fso
set fso=createobject("scripting.filesystemobject")
fso.CreateFolder("c:\another new folder")
fso.CreateFolder("c:\another new folder\and another one")

and then you run wscript.exe from FPW to call the VBScript:

Code:
run wscript.exe "MakeMyDir.vbs"

You're probably better off sticking with the simplicity of a batch file.

Geoff Franklin
 
Geoff,
in this case try
if adir(aaa, "hipaa837", "D") = 0
!md hipaa837
endif
Tesar
 
You might try the following:
Code:
 mcCmd = "MD C:\ononda~1\ONON03~1\KIDS\hipaa837"
 Run &mcCmd

I tested the above approach.
At first I did not have my directories abbreviated correctly and it did not work. But once I got them looking like they would in DOS, the test worked fine.

Good Luck,


JRB-Bldr
VisionQuest Consulting
Business Analyst & CIO Consulting Services
CIOServices@yahoo.com
 
JRB - I like your suggestion. A lot cleaner that what I usually do.

Dave - yes i'm always in this folder.

And everyone - guess what it was. A network issue. I spent two days chasing ghosts!!!!

Thanks everyone.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top