qwerty
06-11-2007, 01:30 PM
i'm trying to grab the path for the All Users Application Data folder, and then add a hard coded folder and file path to it, so i can check for file existence, however, i'm doing something wrong and keep getting an error
here is my code
appdatacommon = shell.GetFolder(SHF_APPLICATIONDATA_COMMON)
appdatacommon_corrected = String.Replace(appdatacommon, "\\", "\\\\", false);
app_data_common = appdatacommon_corrected .. "\\My_Folder\\My_Sub-Folder" ;
The error i get back is
On Click Line xx: attempt to index global `shell' (a nil value)
where xx is the very first line
can anyone help point me in the right direction please, on my machine app_data_common should equal this string
C:\\Documents and Settings\\All Users\\Application Data\\My_Folder\\My_Sub-Folder
TIA, i will continue searching through the help section and the forum, in the mean time a kick in the right direction would be appreciated
here is my code
appdatacommon = shell.GetFolder(SHF_APPLICATIONDATA_COMMON)
appdatacommon_corrected = String.Replace(appdatacommon, "\\", "\\\\", false);
app_data_common = appdatacommon_corrected .. "\\My_Folder\\My_Sub-Folder" ;
The error i get back is
On Click Line xx: attempt to index global `shell' (a nil value)
where xx is the very first line
can anyone help point me in the right direction please, on my machine app_data_common should equal this string
C:\\Documents and Settings\\All Users\\Application Data\\My_Folder\\My_Sub-Folder
TIA, i will continue searching through the help section and the forum, in the mean time a kick in the right direction would be appreciated