Posts: 3,343
Threads: 83
Joined: Mar 2003
Quote:> I have been using the Qbasic Shell command in conjunction with the DOS
> Attrib command- I want to change a files attributes from read only to
> non read only and vice versa. When I use the command Qbasic crashes.
> This only occurs on my Windows XP machine and I have had a similar
> problem on a NT machines. The same coding works fine on DOS/Windows 3
> and Windows 95/98/Me computers.
Anyone?
Posts: 6,419
Threads: 74
Joined: Mar 2002
Attrib does not work in Windows NT
NTFS and stuff, y'know.
Posts: 137
Threads: 9
Joined: Feb 2004
Attrib works fine in NT... from the command line anyway. Make sure you load CMD.EXE under NT to use attrib, instead of command....
SHELL "cmd.exe /c attrib * -r"
for example.
You can use
ENVIRON("COMSPEC") to get the full path to CMD.EXE under NT (also a decent way to detect an NT based OS.
onathan Simpson