Re: [english 100%] Re: [english 100%] Re: open several files
Am 22.12.2009 12:32, schrieb Manolo Martínez: Dear Horst, please remember to copy the list in your replies. I know that i con open several files. But i do not want to open singulary one file after the other. I have to open hundreds of files which are in the same folder and search a possivility to open them with one command (I have to convert all files to txt-format). Is there a possibity to mark all files and to open all files with one klick or another way to open - and convert - all files at the same time? I guess one way to do this is with a simple script that goes file by file doing, lyx yourfile.lyx -e ps ps2ascii yourfile.ps yourfile.txt Does this help? Manolo Thanks. I have use the commands for a singel lyx-document and it funktioned. But i do not know how i can install this script (I am using lyx at this time on windows 7 because i can not install my old opensuse on my new computer whith raid)? Horst
Re: [english 100%] Re: [english 100%] Re: open several files
I'm sorry, I know next to nothing about Windows. The Python script I'm attaching does what you need, maybe it helps? Maybe someone else can provide more relevant help. Cheers, Manolo Thanks. I have use the commands for a singel lyx-document and it funktioned. But i do not know how i can install this script (I am using lyx at this time on windows 7 because i can not install my old opensuse on my new computer whith raid)? Horst import sys, os def Lyxtotxt(n):#Exports .lyx files to .txt argument = lyx -e ps + n os.system(argument) argument = ps2ascii + n[:-4] + .ps + n[:-4] + .txt #n[:-4] is the name of the file without extension os.system(argument) if __name__ == __main__: files = [f for f in os.listdir(os.getcwd()) if os.path.isfile(f)] #puts every filename in the current directory in a list for f in files: if (f[-3:]==lyx): inputfile = f.replace(' ', '\ ') #For a good parsing of spaces in file name Lyxtotxt(inputfile)
Re: [english 100%] Re: [english 100%] Re: open several files
Am 22.12.2009 12:32, schrieb Manolo Martínez: Dear Horst, please remember to copy the list in your replies. I know that i con open several files. But i do not want to open singulary one file after the other. I have to open hundreds of files which are in the same folder and search a possivility to open them with one command (I have to convert all files to txt-format). Is there a possibity to mark all files and to open all files with one klick or another way to open - and convert - all files at the same time? I guess one way to do this is with a simple script that goes file by file doing, lyx yourfile.lyx -e ps ps2ascii yourfile.ps yourfile.txt Does this help? Manolo Thanks. I have use the commands for a singel lyx-document and it funktioned. But i do not know how i can install this script (I am using lyx at this time on windows 7 because i can not install my old opensuse on my new computer whith raid)? Horst
Re: [english 100%] Re: [english 100%] Re: open several files
I'm sorry, I know next to nothing about Windows. The Python script I'm attaching does what you need, maybe it helps? Maybe someone else can provide more relevant help. Cheers, Manolo Thanks. I have use the commands for a singel lyx-document and it funktioned. But i do not know how i can install this script (I am using lyx at this time on windows 7 because i can not install my old opensuse on my new computer whith raid)? Horst import sys, os def Lyxtotxt(n):#Exports .lyx files to .txt argument = lyx -e ps + n os.system(argument) argument = ps2ascii + n[:-4] + .ps + n[:-4] + .txt #n[:-4] is the name of the file without extension os.system(argument) if __name__ == __main__: files = [f for f in os.listdir(os.getcwd()) if os.path.isfile(f)] #puts every filename in the current directory in a list for f in files: if (f[-3:]==lyx): inputfile = f.replace(' ', '\ ') #For a good parsing of spaces in file name Lyxtotxt(inputfile)
Re: [english 100%] Re: [english 100%] Re: open several files
Am 22.12.2009 12:32, schrieb Manolo Martínez: Dear Horst, please remember to copy the list in your replies. I know that i con open several files. But i do not want to open singulary one file after the other. I have to open hundreds of files which are in the same folder and search a possivility to open them with one command (I have to convert all files to txt-format). Is there a possibity to "mark" all files and to open all files with one "klick" or another way to open - and convert - all files at the same time? I guess one way to do this is with a simple script that goes file by file doing, lyx yourfile.lyx -e ps ps2ascii yourfile.ps yourfile.txt Does this help? Manolo Thanks. I have use the commands for a singel lyx-document and it funktioned. But i do not know how i can "install" this script (I am using lyx at this time on windows 7 because i can not install my old opensuse on my new computer whith raid)? Horst
Re: [english 100%] Re: [english 100%] Re: open several files
I'm sorry, I know next to nothing about Windows. The Python script I'm attaching does what you need, maybe it helps? Maybe someone else can provide more relevant help. Cheers, Manolo Thanks. I have use the commands for a singel lyx-document and it funktioned. But i do not know how i can "install" this script (I am using lyx at this time on windows 7 because i can not install my old opensuse on my new computer whith raid)? Horst import sys, os def Lyxtotxt(n):#Exports .lyx files to .txt argument = "lyx -e ps " + n os.system(argument) argument = "ps2ascii " + n[:-4] + ".ps " + n[:-4] + ".txt" #n[:-4] is the name of the file without extension os.system(argument) if __name__ == "__main__": files = [f for f in os.listdir(os.getcwd()) if os.path.isfile(f)] #puts every filename in the current directory in a list for f in files: if (f[-3:]=="lyx"): inputfile = f.replace(' ', '\ ') #For a good parsing of spaces in file name Lyxtotxt(inputfile)