can't list worlds

Posts: 10
Joined: Wed Dec 25, 2019 18:39

can't list worlds

by yushang » Wed Jan 08, 2020 18:18

Hi dear all,
I'm trying to list all worlds with following commands
set MINETEST_WORLD_PATH=D:\minetest\minetest-5.1.0-win64\worlds
minetest --worldlist name
nothing output , I'm sure there are worlds in path D:\minetest\minetest-5.1.0-win64\worlds
what's wrong with this ? many thanks!!!

Posts: 48
Joined: Wed Jul 17, 2019 22:29

Re: can't list worlds

by GayJesus » Fri Jan 10, 2020 11:06

I'm on linux but the default worlds folder for me is hidden.

Posts: 1346
Joined: Fri Apr 19, 2013 16:19
Location: northern Germany
GitHub: twoelk
IRC: twoelk
In-game: twoelk

Re: can't list worlds

by twoelk » Sun Jan 12, 2020 07:27

indeed the command seems not to work in recent versions the way I would have expected, might be a bug. Other commands seem to have similar issues.

but being on windows
you could use a simple dos command such as
Code: Select all

where dir lists the content of a directory,
where /b strips the table entries to just the name,
where /o sorts the entries alphanumeric with numbers first and
where /ad filters to show the directories only instead of also listing the files

you could redirect the results into a file like such
Code: Select all
dir/b/o/ad >>myworlds.txt

you could put the code into a batch file within the worlds folder or specify a fixed path so the batch file works from anywhere on your system
Code: Select all
dir D:\minetest\minetest-5.1.0-win64\worlds /b/o/ad >>myworlds.txt

you could open notepad to inspect the results from within the batchfile
Code: Select all
@echo off
dir/b/o/ad >>myworlds.txt
echo this window closes when you close notepad
notepad myworlds.txt

else in the worlds: section of the file menu_lua_api.txt in your local minetest doc directory there is mentioned the call:
Code: Select all
core.get_worlds() -> list of worlds
if you intend to work from within minetest

Return to Problems

Who is online

Users browsing this forum: No registered users and 7 guests