User Tools

Site Tools


checking_20whether_20a_20directory_20exists

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
checking_20whether_20a_20directory_20exists [2018/04/17 15:18]
tbest3112 Added syntax highlighting
checking_20whether_20a_20directory_20exists [2019/04/25 22:42] (current)
richardrussell Added caution about Windows 10
Line 17: Line 17:
         = F%         = F%
 </​code>​ </​code>​
-This function returns a non-zero value if the directory exists and zero if not. \\ \\  If you want to know whether a file **or** directory with a given name exists you can use a combination of the above functions. However an alternative is to use Windows API calls:​\\ ​+This function returns a non-zero value if the directory exists and zero if not.  ​**Caution**:​ In at least some versions of Windows 10 this does not work, and will return a non-zero value for a file as well as a directory. ​ This appears to be a bug in Windows. 
 + 
 +If you want to know whether a file **or** directory with a given name exists you can use a combination of the above functions. However an alternative is to use Windows API calls:​\\ ​
 <code bb4w> <code bb4w>
         DEF FNcheckdir(name$)         DEF FNcheckdir(name$)
checking_20whether_20a_20directory_20exists.txt · Last modified: 2019/04/25 22:42 by richardrussell