Author Topic: [Classic Rexx] check disk of external drives  (Read 416 times)

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 337
  • Karma: +7/-0
    • View Profile
[Classic Rexx] check disk of external drives
« on: May 14, 2025, 08:53:43 pm »
I've got 3 external USB drives of 1 - 2 TB each attached to this computer, that one need run chkdsk on, after each other to avoid stalls.

I've created a shadow to the following script in the startup folder and disabled automatic chkdisk in the widget of xwp as it otherwise run them i parallell.

This script determine drives with the function SysDriveMap(, 'LOCAL' ) and use a combinationen of SysDriveInfo and SysFileSystemType to determine if each drive is valid, yet not available and in need of chkdsk to run.

It could of course output the type of file system it detect in need of chkdsk, but I've omitted it since chkdsk itself output that during execution.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5406
  • Karma: +128/-1
    • View Profile
Re: [Classic Rexx] check disk of external drives
« Reply #1 on: May 15, 2025, 01:40:03 am »
Thanks, much better then running chkdsk manually. Be nice to have this as part of the USB widget.
Warning, when I formatted my 2TB external drive (JFS) as one partition, after backing everything up, chkdsk would fail due to lack of memory. I had a lot of small files.