Author Topic: loop through or list folders and files  (Read 781 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr Pink

  • Major(1)
  • Posts: 37
loop through or list folders and files
« on: June 25, 2008, 05:14:43 am »
Is there a way to list or loop through folders and files NOT knowing the names or how many?

eg. loop through all the folders in the scripts folder


Offline DorkeyDear

  • Veteran
  • *****
  • Posts: 1507
  • I also go by Curt or menturi
Re: loop through or list folders and files
« Reply #2 on: June 25, 2008, 03:44:43 pm »
Yes, but its limited to folders with no more than 8 character long names using function shell_exec(Command: string): integer; (safemode must be off), I Googled it once and found out how to get all the .PMS files inside the maps directory, ended up being a failure sense most map names (including extention I think, and the ".") are longer than 8 characters long.