PDA

View Full Version : Error for Make Directory



nrodes
08-02-2009, 23:30
I have been trying to develop a very simple program to make some folders and copy files into them. I am getting the error:


Variable not defined or misspelled Keyword

for this line:


DIR_Make(C:\WINDOWS\system_setting)

I have included


USES "FILE"

before it.
Does anyone know whats wrong with my code?

ErosOlmi
08-02-2009, 23:47
Hi nrodes and welcome to thinBasic community forum.

You was almost right but you need to pass a string expression to DIR_Make (http://www.thinbasic.com/public/products/thinBasic/help/html/dir_make.htm)
So change your code to something like:



uses "file"
dir_make("C:\WINDOWS\system_setting")


Or something like:

uses "file"
dim MyNewPath as string
MyNewPath = "C:\WINDOWS\system_setting"
dir_make(MyNewPath)

Ciao
Eros

nrodes
09-02-2009, 00:12
Thank You. My code works fine now :)

ErosOlmi
09-02-2009, 00:23
Perfect.
Ciao
Eros