Author Topic: [Request] GetFileList()  (Read 4195 times)

Stoku

  • lck.gudio.eu
  • Full Member
  • ***
  • Posts: 276
  • Karma: +26/-2
  • Liberty City Killers
    • View Profile
    • Liberty City Killers (GTA3/VC Clan)
[Request] GetFileList()
« on: November 03, 2013, 03:46:17 pm »
Hey,
I need a simple module for my Admin Panel to get list of the files of given extension, eg GetFileList(dir,ext). I'm sure, it'll be an useful util for others too.

Anyone could help me please? Ofc +to credits.

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: [Request] GetFileList()
« Reply #1 on: November 03, 2013, 08:13:34 pm »
Windows: lu_GetFileList_win32.zip
Linux: lu_GetFileList_linux.zip

Source: lu_GetFileList_src.zip

The second parameter is optional, and should not include the dot.

Example:
Code: [Select]
function onScriptLoad() {
LoadModule("lu_GetFileList");

local list = GetFileList("Logs", "log");
for( local i = 0; i < list.len(); i++ )
{
print(list[i]);
}
}

Stoku

  • lck.gudio.eu
  • Full Member
  • ***
  • Posts: 276
  • Karma: +26/-2
  • Liberty City Killers
    • View Profile
    • Liberty City Killers (GTA3/VC Clan)
Re: [Request] GetFileList()
« Reply #2 on: November 03, 2013, 08:31:06 pm »
Thank you Thijn, but the "MSVCR110D.dll" is missing. Did you compile it as debug or release?

Merkel

  • Jr. Member
  • **
  • Posts: 89
  • Karma: +4/-10
    • View Profile
Re: [Request] GetFileList()
« Reply #3 on: November 03, 2013, 10:58:24 pm »
Thank you Thijn, but the "MSVCR110D.dll" is missing. Did you compile it as debug or release?


MSVCR110D = MicroSoft Visual C++ Release 11 0D

Download: http://www.dll-files.com/msvcr110d.zip?0WKfS0YKfS

Put "MSVCR110D.dll" in your Server dir.
Westwood Studios

The best studios company in strategy videogames.

Stoku

  • lck.gudio.eu
  • Full Member
  • ***
  • Posts: 276
  • Karma: +26/-2
  • Liberty City Killers
    • View Profile
    • Liberty City Killers (GTA3/VC Clan)
Re: [Request] GetFileList()
« Reply #4 on: November 04, 2013, 12:16:30 am »
Thank you Thijn, but the "MSVCR110D.dll" is missing. Did you compile it as debug or release?


MSVCR110D = MicroSoft Visual C++ Release 11 0D

Download: http://www.dll-files.com/msvcr110d.zip?0WKfS0YKfS

Put "MSVCR110D.dll" in your Server dir.

Thanks, but I did it already and this file should be located in Windows/System32 dir properly. Don't get me wrong, but I don't want to make people downloading additional dlls, just to use stuff which is developed to make work easier. It must be newbie friendly, for people who doesn't even know how to load script.

NC

  • Full Member
  • ***
  • Posts: 101
  • Karma: +2/-3
  • cipa
    • View Profile
Re: [Request] GetFileList()
« Reply #5 on: November 04, 2013, 12:18:46 am »
... and the release version has always a lighter size ;).

Website online:
My YT channel: http://www.youtube.com/user/1234sdg131

Thijn

  • Tester
  • Sr. Member
  • ****
  • Posts: 531
  • Karma: +27/-16
    • View Profile
Re: [Request] GetFileList()
« Reply #6 on: November 04, 2013, 12:29:33 am »
Im not a great c++ programmer and I received errors when compiling a release build, if someone with a bit more knowledge of what they're doing can take a look. That would be nice.

Fixed, Same link.
« Last Edit: November 04, 2013, 12:53:56 pm by Thijn »

Stoku

  • lck.gudio.eu
  • Full Member
  • ***
  • Posts: 276
  • Karma: +26/-2
  • Liberty City Killers
    • View Profile
    • Liberty City Killers (GTA3/VC Clan)
Re: [Request] GetFileList()
« Reply #7 on: November 23, 2013, 04:54:13 pm »
Im not a great c++ programmer and I received errors when compiling a release build, if someone with a bit more knowledge of what they're doing can take a look. That would be nice.

Fixed, Same link.
Thanks Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?

Juppi

  • Developer
  • Jr. Member
  • *****
  • Posts: 86
  • Karma: +3/-1
    • View Profile
    • Kuslahden alaste GTA:MP clan
Re: [Request] GetFileList()
« Reply #8 on: November 23, 2013, 07:15:56 pm »
Kinda late, but you shouldn't be downloading and using dll's from random sources.

Thanks Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?

You need to install the VS2012 C++ redistributable package from http://www.microsoft.com/en-us/download/details.aspx?id=30679.

Stoku

  • lck.gudio.eu
  • Full Member
  • ***
  • Posts: 276
  • Karma: +26/-2
  • Liberty City Killers
    • View Profile
    • Liberty City Killers (GTA3/VC Clan)
Re: [Request] GetFileList()
« Reply #9 on: November 24, 2013, 11:35:03 am »
Kinda late, but you shouldn't be downloading and using dll's from random sources.

Thanks Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?

You need to install the VS2012 C++ redistributable package from http://www.microsoft.com/en-us/download/details.aspx?id=30679.


I know what I have to do, but I'm not coding for myself but community and I don't want to make people downloading additional things to use a not necessary feature in my admin panel, which is dedicated for newbies and must be easy to use.

Compiling it with the same version of VS as LU wouldn't solve that error? Which redists are installed with LU?
« Last Edit: November 24, 2013, 11:37:06 am by Stoku »

VRocker

  • Liberty Unleashed Developer
  • Administrator
  • Full Member
  • ******
  • Posts: 342
  • Karma: +43/-15
    • View Profile
    • Madnight Software
Re: [Request] GetFileList()
« Reply #10 on: November 26, 2013, 11:16:54 am »
Yes, if modules were compiled with the same version as LU it would solve the redist issue. The thing is, the LU Server doesn't come with any redists and i am pretty sure the readme says it requires the 2008 redists but we recently changed it to 2010 so that needs updating...

We may compile LU in 2012 in the future but it currently doesn't use that due to a bug in the visual C++ compiler which produces really wacky code when compiling LU, this bug was only fixed in visual studio 2 weeks ago but we haven't had chance to make sure that LU now works correctly.

There is nothing wrong with having a range of redists installed on your machine anyway as you will most likely need 2010 and 2012 these days as more and more software start using the latest compilers.


SugarD

  • Argonath RPG Dev/Manager
  • Tester
  • Sr. Member
  • ****
  • Posts: 820
  • Karma: +37/-75
  • STOP IN THE NAME OF THE COLESLAW!
    • View Profile
    • Clan Xperience
Re: [Request] GetFileList()
« Reply #11 on: November 28, 2013, 01:31:56 pm »
Thijn, but now it's missing MSVCR110.dll. It should be probably compiled with the same VC++ redist package as LU has, anyone could recompile it to work without additional thingies please?
MSVCR110d.dll keeps popping up as a requirement for me in the latest version. I think VRocker released a debug build again by accident...*rolls eyes and giggles*

 

© Liberty Unleashed Team.