[TxMt] multiple folders

Alain Matthes alain.matthes at mac.com
Sat Oct 24 15:42:46 UTC 2009


Hi,

I need sometimes to create multiple folders from a
list of names in a file

for example in a file : list_names.txt

January
February
...
December

I would like from textmate use a command like : select the names
  and get the folders.

With bash and without spaces in the names, it's possible to get a result
  with the file list_names.txt (I'm a newbie with bash ! )


#! /bin/bash

for item in `cat list_names.txt`
  do
    mkdir $item
done

But this is not very fine because I can't give the path for output  
folders

1) Is it possible with textmate to create a command and  to give the  
path
  with an interactive action

2) Do you know a Ruby script to make this ? (it's to learn about Ruby)

3) Perhaps "Interactive Input" is an answer to give the path for the  
ouput place
  but I run textmate with Snow Leopard and tm_interactive_input.dylib
  gives me some problem with laTeX.

4) Perhaps with regex, it is possible to determine names with spaces  
inside
  if RC is the separator ?



Then, in these folders,I need to create  a lot of files like
In tkz_graph folder

tkz_graph_example_1.tex
tkz_graph_example_2.tex
...
tkz_graph_example_20.tex

idem with tkz_2d etc ...


To create these files, I use the same LaTeX template and the question  
is the
  like the first one.
  How to create a command with the number of files and
  and the possibility to choice a directory?

An idea was to select "20" and "/Users/ego/work" and to launch the  
command but
I'm not an expert with bash or Ruby to make this ...

Best regards

Alain Matthes




More information about the textmate mailing list