Revision 479 tmp/org.txm.groovy.core/src/groovy/org/txm/macro/text/Text2TXTMacro.groovy

Text2TXTMacro.groovy (revision 479)
3 3

  
4 4
import org.kohsuke.args4j.*
5 5
import groovy.transform.Field
6
import org.txm.rcp.swt.widget.parameters.*
6
import org.txm.rcpapplication.swt.widget.parameters.*
7 7
import org.txm.doc.*;
8 8
import org.txm.importer.*;
9 9

  
......
25 25
	converter = new ConvertDocument();
26 26
	inputDirectory.eachFileMatch(~/.+\.$extension/) { docFile ->
27 27
		String name = docFile.getName()
28
		name = name.substring(0, name.indexOf("."))
28
		name = name.substring(0, name.lastIndexOf("."))
29 29
		def txtFile = new File(docFile.getParentFile(), name+".txt")
30 30
		converter.autoFile(docFile, txtFile, "txt")
31 31
		files << docFile

Also available in: Unified diff