Posts: 285
Threads: 70
Joined: Feb 2005
Thanks - I have put a link to your site now at the top of my programs page.
I should perhaps explain you cannopt read the programs for the BBC for Windows with the EXT of BBC without the software. However every menu in the zip files you download from my site from the BBC Basic page, has a program BBCtoBAS, that converts any BBC file to an ASCII BAS file. These BAS files can in fact still be run with BBC4W.
Gordon
Posts: 127
Threads: 9
Joined: Oct 2004
Quote:Thumbs.db is the most annoying file ever.
And I usually ignore ANY archive or program that contains it.
Agreed.Luckily it's possible to prevent Windows from creating them, as described here: http://www.annoyances.org/exec/show/article03-204
If swimming is so good for your figure, how do you explain walruses?
Posts: 2,771
Threads: 96
Joined: Oct 2003
Z!re is running 98, so I presume she gets annoyed at the fact they are in a lot of archives with no purpose for her.
Posts: 3,522
Threads: 189
Joined: Dec 2003
I'm running 2000 though..
And I dont get them.. but some people are tards, and keep including them in zips, rars etc.. when they send things..
Posts: 285
Threads: 70
Joined: Feb 2005
As I do not like changing the Windows Files setup to show all hidden files, the Windows Search option will not show any THUMBS.DB.
I have managed to adapt a program I produced in Liberty Basic to find all the THUMBS.DB on a drive, then delete them if given the OK. It uses a clever search routine created by someone else. But LB involves some 8 files, that take up over 3 MB, compared with an EXE file compiled with QuickBasic or Free Basic of under 100K.
The problem is by using QB or FB I would have to divert into MSDOS and create a temporary file using say DIR/s thumbs.db ? C:\temp.dat
Then I extract the details of the files to store in TEMP.DAT into an array, for display and deletion if required, which I have done in the past. It would be nice if some clever guy could produce a search routine in QB to avoid my awkward system of creating a temporary file using MS-DOS
Gordon
Posts: 3,522
Threads: 189
Joined: Dec 2003
DIR$() in PDS and FB
There's an interrupt you can use in QB45 that acts the same way as DIR$()
Posts: 285
Threads: 70
Joined: Feb 2005
Zire,
Sorry to be a bit 'thick' but can you explain a bit further and give an example with
There's an interrupt you can use in QB45 that acts the same way as DIR$()
my expertise is rather limited to simple Basic.
Thanks Gordon
Posts: 285
Threads: 70
Joined: Feb 2005
Here is my rather crude method of searching for files, that could be used to delete all the wretched THUMBS.DB files created by Win. XP. You can see it uses DOS DIR /s to create a temporary file C:\ZZZZ.$$$, subsequently deleted. I leave it to you to alter the line PRINT "KILL "; F$(X%) in DEL: to KILL F$(X%). Be it on your own head if you delete the wrong files anytime, remembering under QB the deleted files will not go into the Recycle Bin !!!
Gordon
Code: REM FILE SEARCH
DIM F$(2001): U$ = "Directory": DRV$ = "C"
SCREEN 0: WIDTH 80, 25: CLS
CHDIR "C:\": LOCATE 10, 30: COLOR 10: PRINT "FILE SEARCH"
LOCATE 12, 20
INPUT "ENTER FILENAME OR *.EXT OR Q TO QUIT"; T$
T$ = UCASE$(T$): IF T$ = "Q" THEN END
IF LEN(T$) < 5 THEN
BEEP: PRINT TAB(25); "ILLOGICAL!"
SOUND 59, 10: GOSUB HALT: RUN
END IF
EXT$ = RIGHT$(T$, 3): PRINT : PRINT TAB(8);
PRINT "Please wait while a Search is made of Drive "; DRV$; " for all "; T$; " files."
GOSUB ALIST: S% = 1: E% = 57: IF C% < 57 THEN E% = C%
SCREEN 12: WIDTH 80, 60: GOTO SHOW
NPAGE: S% = S% + 57: E% = E% + 57
IF E% > C% THEN E% = C%
IF S% > C% THEN S% = 1: E% = 57
RETURN
ALIST: S$ = "DIR /s " + T$ + " > C:\ZZZZ.$$$": SHELL S$
C% = 1: CLOSE
OPEN "C:\ZZZZ.$$$" FOR INPUT AS #1
OK = 1: WHILE OK = 1
IF EOF(1) <> 0 THEN OK = 0: GOTO FLAST
LINE INPUT #1, I$
IF LEFT$(I$, 9) = U$ THEN P% = LEN(I$): GOSUB DIR
IF MID$(I$, 10, 3) = EXT$ THEN P% = 12: GOSUB TEXT
FLAST: WEND: CLOSE #1: C% = C% - 1: KILL "C:\ZZZZ.$$$"
CLS : LOCATE 10, 25: COLOR 14: SOUND 1000, 10
PRINT "Total of "; C%; " "; T$; " Files found.": LOCATE 12, 5
GOSUB HALT: RETURN
DIR: N$ = "": X$ = ""
WHILE X$ <> ":": X$ = MID$(I$, P%, 1)
N$ = X$ + N$: P% = P% - 1: WEND
DIR$ = LEFT$(DRV$, 1) + N$: RETURN
TEXT: I$ = LEFT$(I$, 12): N$ = "": X$ = ""
WHILE P% > 0: X$ = MID$(I$, P%, 1)
IF X$ <> " " THEN N$ = X$ + N$
P% = P% - 1: WEND: X = LEN(N$) - 3
F$(C%) = DIR$ + "\" + LEFT$(N$, X) + "." + EXT$
C% = C% + 1
RETURN
SHOW: CLS
FOR R% = S% TO E%
COLOR 10: PRINT USING "####"; R%;
COLOR 14: PRINT " "; F$(R%)
NEX: NEXT R%
IF S% = 1 THEN
COLOR 13: LOCATE 1, 6
PRINT "No. FILE DRIVE/DIRECTORY": LOCATE 1, 1
END IF
IF ERA = 1 THEN RETURN
LOCATE 59, 1: COLOR 15
PRINT "PRESS N next, A abort, D selct deletions, R new search, S save list";
GOSUB HALT2
IF Q$ = "N" OR Q$ = "n" THEN GOSUB NPAGE: GOTO SHOW
IF Q$ = "D" OR Q$ = "d" THEN GOSUB DEL
IF Q$ = "R" OR Q$ = "r" THEN RUN
IF Q$ = "S" OR Q$ = "s" THEN GOTO SAVE
STOP
DEL: LOCATE 59, 1: COLOR 15: PRINT SPACE$(70); : LOCATE 58, 1
INPUT "Enter first and last to be deleted "; first, last
CLS : S% = first: E% = last: ERA = 1: GOSUB SHOW
COLOR 12: PRINT TAB(20); "**** OK TO ERASE THESE FILES Y/N? ****";
GOSUB HALT2: IF Q$ <> "Y" AND Q$ <> "y" THEN RUN
CLS : FOR X% = first TO last
PRINT "KILL "; F$(X%)
NEXT X%: GOSUB HALT: RUN
SAVE:
OP$ = "C:\" + RIGHT$(T$, 3) + "FILES.TXT"
OPEN OP$ FOR OUTPUT AS #1
FOR N% = 1 TO C%
PRINT #1, F$(N%)
NEXT N%: CLOSE #1: CLS : LOCATE 10, 25
PRINT "FILE "; OP$; " NOW SAVED TO DISC."
PRINT : GOSUB HALT: GOTO SHOW
HALT: COLOR 11: PRINT TAB(30); "PRESS A KEY TO CONTINUE"
HALT2: SOUND 500, 1: Q$ = "": WHILE Q$ = "": Q$ = INKEY$: WEND
COLOR 10: RETURN
Posts: 3,522
Threads: 189
Joined: Dec 2003
Gordon, sorry, my expertise is limited too..
You could try searching the forums for it..
The problem is that it doesent list DIR's separately..
However, using your DIR method, you can do:
Code: shell "DIR *.* /S /-P /ON /A-D /-D /B /-C /-N /-Q /-W /-X > PACKLIST"
That overrides most of the annoying switches, like -P, and sets it to show filename+path, one file per line. no other info like size and date etc...
Posts: 285
Threads: 70
Joined: Feb 2005
Thanks Zire,
Another problem I dicovered is these Thumbs.dbs arr hidden. I will let all know if I succeed
Gordon
|