Search found 53 matches
- 11 Nov 2016 10:10
- Forum: DOS Batch Forum
- Topic: merge files and write the original filename before the content (batch) [resolved]
- Replies: 5
- Views: 5422
Re: merge files and write the original filename before the content (batch)
Thank you Squashman, Your fourth example is interesting in my case, because of the token (I have many more files than two and I don't want write their names each time) All is okay. Batch used : @echo off (FOR %%G IN (text*.txt) DO ( echo %%G type "%%~G") )>Output.tmp rename Output.tmp Outp...
- 11 Nov 2016 09:16
- Forum: DOS Batch Forum
- Topic: merge files and write the original filename before the content (batch) [resolved]
- Replies: 5
- Views: 5422
merge files and write the original filename before the content (batch) [resolved]
Hello, I have two files : File1.txt content1 content1 content1 content1 content1 content1 content1 content1 content1 content1 content1 content1 File2.txt content2 content2 content2 content2 content2 content2 content2 content2 content2 content2 content2 content2 I need to merge them and have the orig...
- 01 Jul 2016 14:30
- Forum: DOS Batch Forum
- Topic: Replace with a column (advanced batch)
- Replies: 15
- Views: 10102
Re: Replace with a column (advanced batch)
It works. Thanks again
- 01 Jul 2016 12:24
- Forum: DOS Batch Forum
- Topic: Replace with a column (advanced batch)
- Replies: 15
- Views: 10102
Re: Replace with a column (advanced batch)
I would rather use another language. Save this JScript code with file extension .js and give it a shot var sDir1 = 'Folder1', sDir2 = 'Folder2'; var objFSO = new ActiveXObject('Scripting.FileSystemObject'), objDir1 = objFSO.GetFolder(sDir1), colFiles = new Enumerator(objDir1.Files); for (; !colFile...
- 21 Jun 2016 06:47
- Forum: DOS Batch Forum
- Topic: Replace with a column (advanced batch)
- Replies: 15
- Views: 10102
Re: Replace with a column (advanced batch)
Here is a one-liner (with line continuation for readability) using JREPL.BAT @for %%F in ("folder1\*.csv") do if exist "folder2\%%~nxF" ^ <"folder2\%%~nxF" call jrepl "^(.*?;.*?;).*?(?=;|$)" "$1+str" ^ /jbegln "str=stdin.readLine().replace(/^.*...
- 12 Jun 2016 02:03
- Forum: DOS Batch Forum
- Topic: Replace with a column (advanced batch)
- Replies: 15
- Views: 10102
Re: Replace with a column (advanced batch)
That's awesome
Each file need to have an empty line at the end for avoiding issue (but it is a usual rule...). Other than that, it works perfectly.
Thank you aGerman
Each file need to have an empty line at the end for avoiding issue (but it is a usual rule...). Other than that, it works perfectly.
Thank you aGerman
- 09 Jun 2016 13:59
- Forum: DOS Batch Forum
- Topic: Replace with a column (advanced batch)
- Replies: 15
- Views: 10102
Re: Replace with a column (advanced batch)
Oh okay, thank you aGerman. Yes, some lines are commentaries (lines with #) and don't have semi-colon...
I daily use JREPL for more basic task and it is magical. It save me many hours. You think it can do it ?
I daily use JREPL for more basic task and it is magical. It save me many hours. You think it can do it ?
- 09 Jun 2016 08:35
- Forum: DOS Batch Forum
- Topic: Replace with a column (advanced batch)
- Replies: 15
- Views: 10102
Re: Replace with a column (advanced batch)
Thank you for your help! The other thing that is needed is the folder structure where the files are found, and where the files can be expected to be found. A script can be written for "folder1" and "folder2" but if the files can be in "main\folder1" and "main\apple...
- 08 Jun 2016 12:19
- Forum: DOS Batch Forum
- Topic: Replace with a column (advanced batch)
- Replies: 15
- Views: 10102
Re: Replace with a column (advanced batch)
okay i will try to be clear and thank you! An example with one file in each folder (the two files have the same name - text1.csv) BEFORE Folder1 text1.csv BARBER_TOOLTIP;Go to the Barber; Va cher le coiffeur ;Zum Barbier gehen;;Ir al Peluquero;;;;;;;;;x RENAME_TITLE_TOOLTIP;Rename Title; Renommer ti...
- 08 Jun 2016 08:47
- Forum: DOS Batch Forum
- Topic: Replace with a column (advanced batch)
- Replies: 15
- Views: 10102
Replace with a column (advanced batch)
I have two folders with many csv files with the same name, but not the same content. FOLDER1 : file1.csv, file2.csv,... FOLDER2 : file1.csv, file2.csv,... file1.csv [i]#CODE;ENGLISH;FRENCH;GERMAN;SPANISH; CODE1;IN ENGLISH;IN FRENCH;IN GERMAN;IN SPANISH; CODE2;IN ENGLISH2;IN FRENCH2;IN GERMAN2;IN SPA...
- 08 Jun 2016 08:41
- Forum: DOS Batch Forum
- Topic: How do I start Windows programs from a batch file, please?
- Replies: 9
- Views: 8389
Re: How do I start Windows programs from a batch file, please?
start /wait "C:\Program Files (x86)\GEEdit2\GoldeneyeSetupEditorV2.exe"
start /wait "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
start /wait "C:\Windows\notepad.exe"
start /wait "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
start /wait "C:\Windows\notepad.exe"
- 05 Jun 2016 02:19
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 1996960
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
It works, thank you penpen
- 04 Jun 2016 16:45
- Forum: DOS Batch Forum
- Topic: JREPL.BAT v8.6 - regex text processor with support for text highlighting and alternate character sets
- Replies: 550
- Views: 1996960
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
Hello I have 2 issues with JREPL.BAT 1) FIRST ISSUE In my batch : call jrepl.bat "\[[A-Za-z0-9_.]*?FatherMother\]" "m è re" /x /f TEMP\all_lines.txt /o - call jrepl.bat "\[[A-Za-z0-9_.]*?MasterMistress\]" "ma î tresse" /x /f TEMP\all_lines.txt /o - In my file ...
- 15 Mar 2016 01:22
- Forum: DOS Batch Forum
- Topic: Findstr problem
- Replies: 11
- Views: 9354
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
@foxidrive Thank you for your try. I know it works with other conditions. As Dave said, it doesn't work in some cases only. It is a really nasty bug. @dbenham Dave, thank you so much. I spent all yesterday searching a solution (i added a \L after reading your posts about findstr limitations but to n...
- 14 Mar 2016 15:08
- Forum: DOS Batch Forum
- Topic: Findstr problem
- Replies: 11
- Views: 9354
Re: JREPL.BAT - regex text processor - successor to REPL.BAT
in strings.txt : EVTOPTC_WOL_10420; in input.txt: EVTOPTC_WOL_10420;No, there's no need for additional currencies.;Non, nous n'avons pas besoin de devises supplémentaires.; in output.txt: Missing. I found the line with notepad++, so it's exactly the same string. And other matched lines are quite si...