Jump to content

Close Please Solved.


Recommended Posts

Hi all persons, i need one script in freebsd to read al quest in the folder quest and put in quest_list automatic

 

Here one example with python

import app

self.__AppendFileList("quest")

def __AppendFileList(self, extension):
	carpeta=app.GetFileList("/usr/home/game/share/locale/germany/quest/*."+extension)
	for archivo in carpeta:
		self.sema = open("quest_list2", "w")
		self.sema.write(archivo + "n")
		self.sema.close()

Any person know how put this in freebsd?

 

Thanks.

Link to comment
Share on other sites

import os

def AppendPathName(pathName):
        if(pathName == ""):
           return -1
        else:
           listQuest = [q for q in os.listdir(pathName) if(q.endswith('.quest'))]
           file = open("quest_list","w+")
           for i in xrange(len(listQuest)):
                   file.write(listQuest[i] + "n")


AppendPathName("/usr/home/game/share/locale/germany/quest")

Regards.

  • Love 2

Plain logic saves lives.

Link to comment
Share on other sites

import os

def AppendPathName(pathName):
        if(pathName == ""):
           return -1
        else:
           listQuest = [q for q in os.listdir(pathName) if(q.endswith('.quest'))]
           file = open("quest_list","w+")
           for i in xrange(len(listQuest)):
                   file.write(listQuest[i] + "n")


AppendPathName("/usr/home/game/share/locale/germany/quest")

Regards.

 

Thanx but i'm not searching a python script, only shell script.

 

Thanks pepineitor i go to try it.

 

Function Pepineitor.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 5

      Effect weapons

    2. 3

      Crystal Metinstone

    3. 3

      Feeding game source to LLM

    4. 113

      Ulthar SF V2 (TMP4 Base)

    5. 3

      Feeding game source to LLM

    6. 0

      Target Information System

    7. 3

      Feeding game source to LLM

    8. 2

      anti exp explanation pls

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.