When I compile the code for DOS, it works as expected. However, when I compile it for Win32, it finds no spare directories. It would appear that the NUL device is treated differently by the two platforms.
Is there a universal way to achieve the same end?
Code: Select all
' Find the next available subdirectory for module components and create it
For i = 0 To &HFF
blockdir = "Blocks_" & Hex( i, 2 )
If FileExists( blockdir & "\NUL" ) Then
blockdir = ""
Continue For
Else
Mkdir( blockdir )
Exit For
End If
Next i
If blockdir = "" Then
Print "No spare Blocks_nn directory - program aborted"
End
End If