November 30, 2020, 12:56:21 AM

Author Topic: [bb] AllFiles on AllDrives by Oldefoxx [ 1+ years ago ]  (Read 598 times)

Offline BlitzBot

  • Jr. Member
  • **
  • Posts: 1
[bb] AllFiles on AllDrives by Oldefoxx [ 1+ years ago ]
« on: June 29, 2017, 12:28:42 AM »
Title : AllFiles on AllDrives
Author : Oldefoxx
Posted : 1+ years ago

Description : Displays all files as found on all drives from C: to Z:

Code :
Code: BlitzBasic
  1. AppTitle "List all Files to Screen"
  2. ;  By Donald R. Darden, 2001
  3. ;  This program will print to the screen all the
  4. ;  file names found on drive partitions from C: to
  5. ;  Z:  With some slight changes it can be modified
  6. ;  for use in a Function to locate any directory or
  7. ;  file on any drive upon request.
  8.  
  9. Graphics 640,480
  10. For drive=Asc("C") To Asc("Z")
  11.   folderlist$= Chr(drive)+":"
  12.   While folderlist$>""
  13.     a=Instr(folderList$,Chr$(0),1)
  14.     If a Then
  15.       folder$=Left(folderList$,a-1)
  16.       folderList$=Mid$(folderList$,a+1)
  17.     Else
  18.       folder$=folderList$
  19.       folderList$=""
  20.     End If
  21.     dirhdl=ReadDir(folder$)  
  22.     If dirhdl=0 Then Exit
  23.     Repeat
  24.       file$=NextFile$(dirhdl)
  25.       If file$="" Then Exit
  26.       If FileType(folder$+file$)=2 Then
  27.         comment$="SDir"
  28.         If file$="." Or Right$(file$,2)=".." Then  
  29.           Goto valid
  30.         EndIf
  31.         folderlist$=folder$+file$+""+Chr$(0)+folderlist$
  32.       Else
  33.         comment$="File"
  34.       End If
  35.       Print LSet(folder$+file$,75)+" "+comment$
  36.       file$=Upper(file$)
  37.       For a=Asc("A") To Asc("Z")
  38.         If Instr(file$,Chr$(a),1) Then Goto valid
  39.       Next
  40.       For a=Asc("0") To Asc("9")
  41.         If Instr(file$,Chr$(a),1) Then Goto valid
  42.       Next
  43.       Print "["+file$+"]"
  44.       WaitKey
  45. .valid
  46.     Forever
  47.     CloseDir(dirhdl)
  48.   Wend
  49. Next
  50. WaitKey
  51. End


Comments :


XtremeCoder(Posted 1+ years ago)

 it crashes when it hits a thumbs.db file


gameshastra(Posted 1+ years ago)

 hi, could you plz explain how can i save the screenshots of the game i.e image on the screen in to a specific file location. i have used savepixpng, but i can able store it in a file which is in the same directory. But i could like to know is there any possiblity to store the drawn image into a file, which is in some other directory and load it back to the screen again....


tonyg(Posted 1+ years ago)

 Why are you asking this question in a Code Archive post when there is a whole forum dedicated to asking questions?Either post the question in your own new thread or search on Savepixmappng and find the answer yourself.Here's a tip... look for Requestfile in your IDE Help Documentation.


 

SimplePortal 2.3.6 © 2008-2014, SimplePortal