sa_arvind
26th December 2008, 06:52
Hi All,
I want to check the client windows directory is valid and it has the write permission or not. User inputs the path of the directory on the form and so i have to validate whether if the path is valid and it has the write permission or not. please check the codes below:
field.repert:
check.input:
if strip$(shiftl$(repert)) = "" then
message("Path cannot be empty")
set.input.error("")
else
ret = create.local.directory(strip$(shiftl$(repert))&"\tmp")
if ret = 0 then
remove.local.directory(strip$(shiftl$(repert))&"\tmp")
else
if ret = 5 then
message("No Permission to write")
set.input.error("")
else
if ret <> 183 then
message("Not a valid Path")
set.input.error("")
endif
endif
endif
endif
Note:
repert is the form field where the user enters the path.
Thanks in advance.
sa_arvind
I want to check the client windows directory is valid and it has the write permission or not. User inputs the path of the directory on the form and so i have to validate whether if the path is valid and it has the write permission or not. please check the codes below:
field.repert:
check.input:
if strip$(shiftl$(repert)) = "" then
message("Path cannot be empty")
set.input.error("")
else
ret = create.local.directory(strip$(shiftl$(repert))&"\tmp")
if ret = 0 then
remove.local.directory(strip$(shiftl$(repert))&"\tmp")
else
if ret = 5 then
message("No Permission to write")
set.input.error("")
else
if ret <> 183 then
message("Not a valid Path")
set.input.error("")
endif
endif
endif
endif
Note:
repert is the form field where the user enters the path.
Thanks in advance.
sa_arvind