In light of me diagnosing corrupted file entries etc here viewtopic.php?p=103887#p103887
Could anyone just write me a program which say creates 100 folder in C: root, then writes 100 folders in each of those folders for 10,000 folders total (maybe more folders would help but cant remember per directory limits , if any?)
Then have a loop which reads all the folder names and verifies they are all correct. Outputs error somehow, either change screen red or just stop and output error found.
Currently it only seems to error on deleting files, but I don't think deleting files is the problem, I think its reading the FAT incorrectly causing bad folder names.
Oddly doesn't seem to ever error on actual files. so not sure it is needed to actually write any files or verify them. It could have a secondary verification test which may be ultimately useful to others as well. Maybe write a known number sequence to files in each folder created and verify contents. But at this time I dont think its needed.
Currently I'm having to sit all day watching it delete endless thousands of folders manually and just not a constructive use of time :roll:
REMINDER - Stay logged in for at least 2 hours a week to get whitelisted.
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)
Also it helps build a picture where our "good traffic" is coming from for detection scripts.
:o)
Can any write a folder create and verify program ?
-
exxos
- Site Admin

- Posts: 28601
- Joined: 16 Aug 2017 23:19
- Location: UK
-
exxos
- Site Admin

- Posts: 28601
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: Can any write a folder create and verify program ?
I asked ChatGPT but no idea if it's correct :lol: Assume not.
Code: Select all
START equ $4000
SYSBASE equ $4
DOSBASE equ $4BA
FO_CREATE equ $5A
FO_DELETE equ $5C
FO_OPEN equ $58
FO_CLOSE equ $5E
FO_READ equ $62
DNAMELEN equ 64
FSIZE equ 16
DFL_MODE equ $1FF
lea start(PC),a0
movea.l a0,a6
movea.l sysbase,a6
move.l dosbase,a1
create_loop:
moveq #0,d0
lea filename(PC),a2
moveq #DOS,A3
move.l a1,(a6)
jsr fo_create(a6)
move.l d0,d1
tst.l d1
bne.s error
move.l d0,a0
movea.l #FO_OPEN,a1
jsr (a1)
move.l d0,d1
moveq #0,d0
tst.l d1
bne.s error
move.l d0,a0
movea.l #FO_CLOSE,a1
jsr (a1)
movea.l a1,a0
movea.l #FO_DELETE,a1
jsr (a1)
move.l d0,d1
moveq #0,d0
tst.l d1
bne.s error
dbra d7,create_loop
end_loop:
move.l d7,d0
move.l d7,d1
sub.l d6,d0
move.l a1,a0
jsr fo_read(a6)
move.l d0,d1
moveq #0,d0
cmp.l d1,d0
bne.s error
error:
nop
stop #$2700
nop
filename: dc.b 'testdir',0
start: nop
-
chronicthehedgehog
- Site sponsor

- Posts: 384
- Joined: 08 May 2022 18:11
- Location: The Midlands
Re: Can any write a folder create and verify program ?
If no one does it sooner I'll knock something up next weekend when I get back
-
dad664npc
- Posts: 176
- Joined: 12 Sep 2022 14:32
- Location: Oxfordshire
Re: Can any write a folder create and verify program ?
Here you go...
Directory count is an issue - I had to add FLDRXXX.PRG to AUTO for it to work. Without it, getting out of memory errors. e.g FLDR999.PRG
Test prompts for drive letter to create directories - defaults to C:
Test then prompts for number of directories to create - defaults to 100 - max of 999
Directory creation starts - <drive letter:>/DIRTEST/DIRWRxxx where xxx is an incremented number
If directory creation fails - an error is printed and the test aborts
If all directories are created, then the test goes on to delete them all. If a directory is not found ie. a write error occurred and trashed the name, then an error is printed
At the end of the test you should examine <drive letter:>/DIRTEST - it should be empty
It takes around 40 minutes to create and erase 999 directories on my STe with 4MB and TOS 2.06
NOTE - I've only tried this with HDDriver 512MB TOS/WIN partitions
Hope this does what you want
Directory count is an issue - I had to add FLDRXXX.PRG to AUTO for it to work. Without it, getting out of memory errors. e.g FLDR999.PRG
Test prompts for drive letter to create directories - defaults to C:
Test then prompts for number of directories to create - defaults to 100 - max of 999
Directory creation starts - <drive letter:>/DIRTEST/DIRWRxxx where xxx is an incremented number
If directory creation fails - an error is printed and the test aborts
If all directories are created, then the test goes on to delete them all. If a directory is not found ie. a write error occurred and trashed the name, then an error is printed
At the end of the test you should examine <drive letter:>/DIRTEST - it should be empty
It takes around 40 minutes to create and erase 999 directories on my STe with 4MB and TOS 2.06
NOTE - I've only tried this with HDDriver 512MB TOS/WIN partitions
Hope this does what you want
You do not have the required permissions to view the files attached to this post.
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
PiStorm JIT dev - https://github.com/gotaproblem/pistorm-atari-jit
Pico HDC - https://bbansolutions.co.uk
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
PiStorm JIT dev - https://github.com/gotaproblem/pistorm-atari-jit
Pico HDC - https://bbansolutions.co.uk
-
exxos
- Site Admin

- Posts: 28601
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: Can any write a folder create and verify program ?
Nice one thanks. Will try when I get back home.
Does it verify folder names as creating and deleting alone generally isn't enough . That's the odd thing, that invalid folder names are still deleted like it read the correct name but displayed a corrupted one. I've not seen anything left on the drive during all my tests. It's very odd.
Does it verify folder names as creating and deleting alone generally isn't enough . That's the odd thing, that invalid folder names are still deleted like it read the correct name but displayed a corrupted one. I've not seen anything left on the drive during all my tests. It's very odd.
-
dad664npc
- Posts: 176
- Joined: 12 Sep 2022 14:32
- Location: Oxfordshire
Re: Can any write a folder create and verify program ?
Yes it verifies directory names. If a corrupted directory exists then it will not be deleted - a message will be printed to say the expected directory does not exist and it will abort the test, so all directories after the failed one will remain
ATARI STfm, STe, Mega ST, TT
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
PiStorm JIT dev - https://github.com/gotaproblem/pistorm-atari-jit
Pico HDC - https://bbansolutions.co.uk
Amstrad CPC464, CPC6128
PiStorm dev - https://github.com/gotaproblem/pistorm-atari
PiStorm JIT dev - https://github.com/gotaproblem/pistorm-atari-jit
Pico HDC - https://bbansolutions.co.uk
-
exxos
- Site Admin

- Posts: 28601
- Joined: 16 Aug 2017 23:19
- Location: UK
Re: Can any write a folder create and verify program ?
So I took out the mods I did on my STE blitter. First run or the program created a few folders then crashed, though this is actually to be expected under the specific conditions I am looking for.
Now it is just a matter of leaving it on and see how long it takes until it fails again. Its on its 3rd 999 folder pass. So I think really it should have failed again by now. I will fill up the SD Card and again and make sure it does those fine again next. Likely will continue in my blog as not to cross threads to much.
Now it is just a matter of leaving it on and see how long it takes until it fails again. Its on its 3rd 999 folder pass. So I think really it should have failed again by now. I will fill up the SD Card and again and make sure it does those fine again next. Likely will continue in my blog as not to cross threads to much.
Who is online
Users browsing this forum: ClaudeBot and 3 guests