Search found 184 matches

by pditty8811
20 Jun 2014 03:22
Forum: DOS Batch Forum
Topic: How to findstr strings that are German?
Replies: 10
Views: 12299

Re: How to findstr strings that are German?

I think I'll stay with the for loops. It's working so that's fine.
by pditty8811
20 Jun 2014 01:16
Forum: DOS Batch Forum
Topic: How to findstr strings that are German?
Replies: 10
Views: 12299

Re: How to findstr strings that are German?

findstr /c: Does not work. However, this does work: for /f "tokens=*" %%f in (test.txt) do ( set var1=%%f echo !var1! if "!var1!"=="Brunsbüttel" ( echo FOUND Brunsbüttel!! )else ( echo NOT FOUND AGAIN ) ) But I fear it will take longer processing time than findstr. Is ...
by pditty8811
20 Jun 2014 00:28
Forum: DOS Batch Forum
Topic: How to findstr strings that are German?
Replies: 10
Views: 12299

Re: How to findstr strings that are German?

Thanks foxi for your quick reply. I suppose a Babel routine would work. I would need to translate it from German to English, then back when I am finished. Know where I can find such a function, that I can call? Or how do we go about this? Say I have a text file with several German city names within ...
by pditty8811
19 Jun 2014 22:34
Forum: DOS Batch Forum
Topic: How to findstr strings that are German?
Replies: 10
Views: 12299

How to findstr strings that are German?

I'm trying to findstr or compare two strings in batch which will contain German words, like: Seebrügge (notice the accent) How do I do this? I know how to write batch, but batch isn't cooperating me with this. I'm searching .txt files for words like Seebrügge. Or comparing variables which may contai...
by pditty8811
28 Dec 2013 19:38
Forum: DOS Batch Forum
Topic: Find newest file in all subdirectories
Replies: 18
Views: 17793

Re: Find newest file in all subdirectories

Perhaps I'm implementing it wrong. I just copy and paste it in a .bat file and then launch it. This is how it is intended. It just opens and closes. Where do I put the pause command? It sounds, like you started it by double clicking the bat file, or similar. You might add a pause between the "...
by pditty8811
28 Dec 2013 17:05
Forum: DOS Batch Forum
Topic: Find newest file in all subdirectories
Replies: 18
Views: 17793

Re: Find newest file in all subdirectories

I'm using WinXP (home and prof, both on actual patch level), too, and it works fine there using NTFS, or FAT32, so i think there must be another issue. penpen Edit: I've found a bug and corrected it, please retry with the changed code above; i haven't tested with empty subdirectories. Perhaps I'm i...
by pditty8811
28 Dec 2013 13:56
Forum: DOS Batch Forum
Topic: Find newest file in all subdirectories
Replies: 18
Views: 17793

Re: Find newest file in all subdirectories

penpen wrote:So how about this JScript (batch/JScript) named "getNewest":


This is telling me dateLastModified is null or not an object. Must be OS specific. I'm using xp.
by pditty8811
27 Dec 2013 18:46
Forum: DOS Batch Forum
Topic: Find newest file in all subdirectories
Replies: 18
Views: 17793

Re: Find newest file in all subdirectories

If last write access defines what you have called the newest file, then this cmd(.exe) shell one-liner should echo you the newest file in the actual directory and all of its subdirectories: @(for /F "tokens=* delims=" %F in ('dir /B /S') do @(echo %~tF#%~dpnxF))|sort /R|findstr /N "^...
by pditty8811
27 Dec 2013 18:44
Forum: DOS Batch Forum
Topic: Find newest file in all subdirectories
Replies: 18
Views: 17793

Re: Find newest file in all subdirectories

If last write access defines what you have called the newest file, then this cmd(.exe) shell one-liner should echo you the newest file in the actual directory and all of its subdirectories: @(for /F "tokens=* delims=" %F in ('dir /B /S') do @(echo %~tF#%~dpnxF))|sort /R|findstr /N "^...
by pditty8811
27 Dec 2013 16:48
Forum: DOS Batch Forum
Topic: Find newest file in all subdirectories
Replies: 18
Views: 17793

Re: Find newest file in all subdirectories

Squashman wrote:Just two nested For Loops. First one gets the directory name. Second one gets the newest file in the directory. Look at the help for the DIR command and use that with the FOR loops.


Perhaps you didn't understand me. I'm looking for the newest file in all subdirectories. That is, one file total.
by pditty8811
27 Dec 2013 16:03
Forum: DOS Batch Forum
Topic: Find newest file in all subdirectories
Replies: 18
Views: 17793

Find newest file in all subdirectories

Find newest file in all subdirectories?

I know this question has been asked before. Could someone post a vbs script or batch that does this. If you do, please tell me how many parameters it takes and what kind. So I know how to execute it.

Thanks.
by pditty8811
30 Oct 2013 16:45
Forum: DOS Batch Forum
Topic: Complicated Search and Replace using VBScript
Replies: 15
Views: 12397

Re: Complicated Search and Replace using VBScript

I was able to do the date. Thanks for your help otherwise.
by pditty8811
30 Oct 2013 15:59
Forum: DOS Batch Forum
Topic: Complicated Search and Replace using VBScript
Replies: 15
Views: 12397

Re: Complicated Search and Replace using VBScript

TBH it's gone a little beyond what is on topic here, where you want everything in a VBS script. There are Usenet VBS newsgroups, and maybe StackOverflow would be another option at stackoverflow.com Or m or m Understood. I guess I'm on my own now. I did fix the script for Name=. Now I just need date...
by pditty8811
30 Oct 2013 15:15
Forum: DOS Batch Forum
Topic: Complicated Search and Replace using VBScript
Replies: 15
Views: 12397

Re: Complicated Search and Replace using VBScript

Its not getting within this statement here for some reason:

Code: Select all

if line = "Origin="+objArgs(0) then
by pditty8811
30 Oct 2013 14:47
Forum: DOS Batch Forum
Topic: Complicated Search and Replace using VBScript
Replies: 15
Views: 12397

Re: Complicated Search and Replace using VBScript

The script is still not making edits to the file.

is this the issue then?

if not line = "Name="+line2 then