Can Turing access the startup folder in Windows XP? I'm getting an error, maybe there's something wrong with my code but it shows up as read only:
Turing: |
type data :
record
size, attribute, fileTime, stream : int
pathName : string
end record
var file : data
file.pathName := "C:/Documents and Settings/" + Sys.GetUserName + "/Start Menu/Programs/Startup"
File.Status (file.pathName, file.size, file.attribute, file.fileTime )
if Error.Last = eNoError then
put " Name: ", File.FullPath (file.pathName )
put " Created: ", Time.SecDate (file.fileTime )
put " Size: ", file.size, " bytes"
put "Attributes: " ..
if (file.attribute and ootAttrDir ) not= 0 then
put "Directory " ..
else
put "" ..
end if
if (file.attribute and ootAttrRead ) not= 0 then
put "Readable " ..
else
put "" ..
end if
if (file.attribute and ootAttrWrite ) not= 0 then
put "Writable " ..
else
put "" ..
end if
if (file.attribute and ootAttrExecute ) not= 0 then
put "Executable", skip
else
put skip
end if
else
put "Unable to get file information"
put "Error: ", Error.LastMsg, skip
end if
open : file.stream, file.pathName, put, mod
%put :
close : file.stream
|
|