Jump to content

Import all files in meta


Iaan

Recommended Posts

Posted (edited)

Same could be done with any other files (scripts, maps), to be honest, not just file...files.

At the moment we can do this but it will require a separate watch script to implement the functionality.

Edited by myonlake
  • 1 month later...
Posted (edited)

Good idea, but I would do asterisk substitute for any characters also. For example:

*.txd - all files with txt extension

file_*.txd - file_1, file_2, file_3, etc

Edited by Dante383
  • Like 2
Posted
7 minutes ago, Dante383 said:

Good idea, but I would do asterisk substitute for any characters also. For example:

*.txd - all files with txt extension

file_*.txd - file_1, file_2, file_3, etc

Of course, this is another nice example.

Posted

It would be useful. But in the meantime you could use this simple shell script (if running linux):

for name in *.png #will go through all pngs, use * for all files.
do
echo "<file src=\"/images/$name\" type=\"client\" />" #$name will get replaced with file names
done

Just put it in the same directory as the files and then run simply like: ./test.sh > list.txt

Then just copy it from list.txt to meta.xml.

Hopefully someone can find it useful if they're not familiar with shell scripting.

  • Like 1
  • 3 weeks later...
Posted

It need to be . That saves a lot of time. But not "*" simple, if I just want some files like txd. "*.txd" or dff "*.dff".
Good idea anyway.

  • 3 weeks later...
Posted

I don't think it's really required since it can be done with any other programming languages. Just google it, there are already a few of examples.

Posted
On 21/04/2017 at 07:29, ozulus said:

I don't think it's really required since it can be done with any other programming languages. Just google it, there are already a few of examples.

I know it, but, why not implement this ? It's something simple and very productive.

I use a script similiar: 

On 04/03/2017 at 23:10, MIKI785 said:

It would be useful. But in the meantime you could use this simple shell script (if running linux):


for name in *.png #will go through all pngs, use * for all files.
do
echo "<file src=\"/images/$name\" type=\"client\" />" #$name will get replaced with file names
done

Just put it in the same directory as the files and then run simply like: ./test.sh > list.txt

Then just copy it from list.txt to meta.xml.

Hopefully someone can find it useful if they're not familiar with shell scripting.

 

  • 2 weeks later...
Posted
On 4/21/2017 at 05:29, ozulus said:

I don't think it's really required since it can be done with any other programming languages. Just google it, there are already a few of examples.

What if I want to make a script that automatically detects files I place in a folder?  I can think of allot of ways this will come in handy.

  • Recently Browsing   0 members

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