Sort Problems By Rank

    Keywords: Software

This script is for windows xp users. Maybe it is working under other versions, too.

PURPOSE: Allowing Windows Xp users ( maybe other versions are ok, too) to sort the problems fetched from by ranks mentioned in the DI tag of the sgf-files.
1. Create a new folder , create a new textfile there and name it as you like , but make sure to change the filename extension from .txt to .bat
Now copy the sourcecode, found below the horizontal ruler, into the file.
2. Get the goproblems from
3. Put the problems in the folder you have created under 1 above.
4. Now click on taskbar: Start > Execute .
enter 'cmd' (without the enclosing 's) and click the OK button.
5. Now change to the directory containing the related files. E.g.: If you have created a new folder named
then type d:\ and press enter-button. Now change to the directory by typing: cd path\to\new\folder\
You should now be at the correct location.
6. Type: theNameYouGaveTheFileHere.bat, press enter to start the sorting. 7. Wait
AUTHOR : Benjamin Egner
DATE : 2006/12/17
REMARK : Depending on your machine speed this might take a few minutes. Please do not redistribute modified versions of this file.
If this has been useful for you, you can drop a line.

a simpler explanation.
copy the text below into notepad.
save as sort.bat
put sort.bat into the same folder as the goproblems sgf.
execute sort.bat by double clicking
(thanks for the script benjamin! )

for %%P in (*.sgf) do (
 echo --- processing %%P ---
 for /f "delims=][ tokens=4" %%i in ('findstr "DI" %%P') do (
 if exist %%i (
   copy %%P %%i
 ) else (
   mkdir %%i
   copy %%P %%i

For unix shell users there is a script at DisortSh.

Sort Problems By Rank last edited by VanMorrison on August 16, 2018 - 13:31
RecentChanges · StartingPoints · About
Edit page ·Search · Related · Page info · Latest diff
[Welcome to Sensei's Library!]
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Login / Prefs
Sensei's Library