Search found 55 matches
- 16 Jan 2024 15:52
- Forum: DOS Batch Forum
- Topic: FOR /R puzzler? (wildcarded folders only, e.g. A*)
- Replies: 5
- Views: 11965
Re: FOR /R puzzler? (wildcarded folders only, e.g. A*)
That is also valuable and instructive, and provides rich context and valuable, instructive examples. Thank you.
- 15 Jan 2024 11:28
- Forum: DOS Batch Forum
- Topic: FOR /R puzzler? (wildcarded folders only, e.g. A*)
- Replies: 5
- Views: 11965
Re: FOR /R puzzler? (wildcarded folders only, e.g. A*)
I feel short of words in responding. I consulted AI, and the answer is... (As expressed by character Jeff Spicoli of "Fast Times at Ridgemont High") "Awesome! Totally awesome!" That's everything that I could ask for AFAIAC. I incorporated in my .bat calling .bat and success. Solved. I observed somet...
- 15 Jan 2024 05:32
- Forum: DOS Batch Forum
- Topic: FOR /R puzzler? (wildcarded folders only, e.g. A*)
- Replies: 5
- Views: 11965
Re: FOR /R puzzler? (wildcarded folders only, e.g. A*)
Let me add, about redirection, some of you who are highly comfortable and proficient with redirection and piping might be thinking "he's shooting himself in the foot because piping (DIR A*.) is certainly the expedient answer". If so, okay, I'll do it the "right" way. It's just that if I can simply a...
- 15 Jan 2024 03:34
- Forum: DOS Batch Forum
- Topic: FOR /R puzzler? (wildcarded folders only, e.g. A*)
- Replies: 5
- Views: 11965
FOR /R puzzler? (wildcarded folders only, e.g. A*)
FOR /R puzzler? (wildcarded folders only, e.g. A*) I have c:\JOE\ALAN, c:\JOE\ALBERT, c:\JOE\ANNA, c:\JOE\BOB Launching from \JOE\, I want to findstr every file hat.txt that contains the string {cat} (no braces), but only for DIRs that begin with the letter A; and include the DIR in the output, perh...
- 25 Oct 2021 17:07
- Forum: DOS Batch Forum
- Topic: right click command line help
- Replies: 14
- Views: 14072
Re: right click command line help
Thank you - similar to my new understanding that %~p is "already" effectively quoted if there are spaces, but not if there is an ampersand even if there are spaces.
I don't know what I would have done without you guys.
I don't know what I would have done without you guys.
- 25 Oct 2021 14:28
- Forum: DOS Batch Forum
- Topic: right click command line help
- Replies: 14
- Views: 14072
Re: right click command line help
Anyway, I see that you used double quoting. It new works when surrounding with double quotes.
The double quoting wasn't necessary when embedded spaces were in the folder name, but were with the ampsersand. Thanks for getting me to that solution.
The double quoting wasn't necessary when embedded spaces were in the folder name, but were with the ampsersand. Thanks for getting me to that solution.
- 25 Oct 2021 14:21
- Forum: DOS Batch Forum
- Topic: right click command line help
- Replies: 14
- Views: 14072
Re: right click command line help
(deleted)
- 25 Oct 2021 08:51
- Forum: DOS Batch Forum
- Topic: right click command line help
- Replies: 14
- Views: 14072
Re: right click command line help
I apologize in advance if this has been covered. I bled mucho time searching before posting. I am finding that the "p" in the magic substitution string %%~_1 causes processing failure if an ampersand is in the DIR name, e.g. c:\my dog & pony This is on Win 10, regular CMD, .BAT. %1 is foo.txt (or fo...
- 11 Feb 2021 02:47
- Forum: DOS Batch Forum
- Topic: Using RegEx on a pair of lines at same time?
- Replies: 6
- Views: 7337
Re: Using RegEx on a pair of lines at same time?
BTW, the reason I ended up with "7*" anyway was from a batch %1. The user went foo.bat 7* under the understandable notion that it would return anything with a 7 in it. Methinks I'll need to disallow asterisks in %1 for this project.There's too much risk that the user will either use .* when * is nec...
- 11 Feb 2021 02:32
- Forum: DOS Batch Forum
- Topic: Using RegEx on a pair of lines at same time?
- Replies: 6
- Views: 7337
Re: Using RegEx on a pair of lines at same time?
Just a quick note, suddenly underwater here on other projects... Thank you for your [as always] steady, precise and thorough, and insightful performance. What can I say. I solved my issue with character class -- user error, surprise, surprise. And I can explain why I reached the silly-sounding concl...
- 10 Feb 2021 17:00
- Forum: DOS Batch Forum
- Topic: Using RegEx on a pair of lines at same time?
- Replies: 6
- Views: 7337
Re: Using RegEx on a pair of lines at same time?
What a work of art! I'll need to come back to this when I can put in some time but I'll mention a few things - Yes, /OD within each folder is what I'm accustomed to and my initial intent was to see the /OD grouped sorts, though the other everything at once way SOMETIMES is what I prefer (which I've ...
- 09 Feb 2021 23:52
- Forum: DOS Batch Forum
- Topic: Using RegEx on a pair of lines at same time?
- Replies: 6
- Views: 7337
Re: Using RegEx on a pair of lines at same time?
Note I found Dave's https://ss64.com/nt/findstr-linebreaks.html "FINDSTR - Searching across Line Breaks" but it is confusing where he says "I can't graphically represent the characters" and I don't understand why he shows !CR!*!LF! instead of $^ but anyway that didn't work either - it did not report...
- 09 Feb 2021 22:26
- Forum: DOS Batch Forum
- Topic: Using RegEx on a pair of lines at same time?
- Replies: 6
- Views: 7337
Using RegEx on a pair of lines at same time?
I have a .BAT that reports every found "a.txt" and directory names via something like dir /a /od /s *.* | FINDSTR /I /R /C:"a.txt" /C:" Directory of " (As you maybe guessed I'm using this construct to avoid "false positives" on short file names. It's actually more complex than this but this will suf...
- 05 Apr 2020 08:44
- Forum: DOS Batch Forum
- Topic: Runaway problem with FINDSTR "Line {nnn} is too long"
- Replies: 1
- Views: 6344
Runaway problem with FINDSTR "Line {nnn} is too long"
I have [at least one] irritating file, C:\Windows\SoftwareDistribution\DataStore\DataStore.edb that produces a runaway FINDSTR. (FWIW, the input file is over 2G.) Stderr begins with FINDSTR: Line 2 is too long. FINDSTR: Line 2 is too long. FINDSTR: Line 2 is too long. FINDSTR: Line 3 is too long. FI...
- 24 Mar 2019 18:53
- Forum: DOS Batch Forum
- Topic: Directory "file dates" keep changing (for DIR) - Win 10
- Replies: 9
- Views: 10113
Re: Directory "file dates" keep changing (for DIR) - Win 10
Think of the basic FAT and file system architecture. If I add a file A.TXT to c:\foo, nothing in the file system need change for FOO entries (at least, never needed to until "last accessed" came into being). A file entry for A.TXT with that creation date is created; but that alone would be no reason...