cd$ = space$(_MAX_PATH)
calldll #kernel32, "GetCurrentDirectoryA", _MAX_PATH as long, cd$ as ptr, r as long
cd$ = left$(cd$, r)
print "Current Directory = "; cd$
print "DefaultDir$ = "; DefaultDir$
print "StartupDir$ = "; StartupDir$
print "Press any key to quit"
dummy$ = input$(1)
end
dim DirectoryInfo$(0,0)
files DefaultDir$, DirectoryInfo$()
print "DefaultDir$ = "; DirectoryInfo$(0,2); DirectoryInfo$(0,3)
print "Subdirectory Count = "; DirectoryInfo$(0,1)
print "File Count = "; DirectoryInfo$(0,0)
print
files StartupDir$, DirectoryInfo$()
print "StartupDir$ = "; DirectoryInfo$(0,2); DirectoryInfo$(0,3)
print "Subdirectory Count = "; DirectoryInfo$(0,1)
print "File Count = "; DirectoryInfo$(0,0)
print
cd$ = space$(_MAX_PATH)
calldll #kernel32, "GetCurrentDirectoryA", _MAX_PATH as long, cd$ as ptr, r as long
cd$ = left$(cd$, r)
files "", "*", DirectoryInfo$()
print "Current Directory = "; cd$
print "Subdirectory Count = "; DirectoryInfo$(0,1)
print "File Count = "; DirectoryInfo$(0,0)
print
input "New 'DefaultDir$'? "; DD$
if DD$<>"" then
DefaultDir$=DD$
cd$ = space$(_MAX_PATH)
calldll #kernel32, "GetCurrentDirectoryA", _MAX_PATH as long, cd$ as ptr, r as long
cd$ = left$(cd$, r)
print "Current Directory = "; cd$
end if
open "AnatolyTest.dat" for output as #1
close #1
print "Confirm location of 'AnatolyTest.dat'."
input "Press any key to delete 'AnatolyTest.dat' and end the program: "; x$
kill "AnatolyTest.dat"
print "Program complete."
end