Search found 539 matches
- 23 Sep 2021 12:26
- Forum: DOS Batch Forum
- Topic: Array construction with empty value
- Replies: 9
- Views: 6954
Re: Array construction with empty value
If I put double quotes around it, it works (doesn't bomb) but then the value has two sets of quotes instead of one...hmmm DLR_DATA_FDRII1,DLR_DATA_FDRII1 inbox/LOC_DATA_FDRII Mode=""REPLACE Data"" If I do this, it works, but seems a bit clunky to remove the quotes: FOR %%a IN ( "FDR|DLR_DATA_FDRII,D...
- 23 Sep 2021 12:17
- Forum: DOS Batch Forum
- Topic: Array construction with empty value
- Replies: 9
- Views: 6954
Re: Array construction with empty value
HI Aacini - Thank you very much!! I really like your methodology and I'm going to poke around with it now! In the mean time, I still need to leverage my current methods until I'm able to make the switch. With that said, I do believe I still need my first for loop otherwise it does not cycle through ...
- 23 Sep 2021 11:19
- Forum: DOS Batch Forum
- Topic: Best way to pull out specifc lines from text file? JREPL?
- Replies: 6
- Views: 5596
Re: Best way to pull out specifc lines from text file? JREPL?
Aacini - that worked like a charm!! Thank you!!
- 23 Sep 2021 03:47
- Forum: DOS Batch Forum
- Topic: Best way to pull out specifc lines from text file? JREPL?
- Replies: 6
- Views: 5596
Best way to pull out specifc lines from text file? JREPL?
HI Folks - I have the following text file that is an output from a data load process I run. I need to scan the file and if an instance of "| Error: " is found, I need to create another file with a header and applicable rows. Here is my file which I have pulled out at the etra garbage to keep it shor...
- 21 Sep 2021 02:09
- Forum: DOS Batch Forum
- Topic: Array construction with empty value
- Replies: 9
- Views: 6954
Re: Array construction with empty value
Thank you, Terry!! Your suggestion is working great for me!!
- 18 Sep 2021 08:33
- Forum: DOS Batch Forum
- Topic: Array construction with empty value
- Replies: 9
- Views: 6954
Re: Array construction with empty value
Found a couple old threads and this is what I came up with: @ECHO OFF SETLOCAL ENABLEDELAYEDEXPANSION FOR %%a IN ( "FDR|DLR_DATA_FDRII,DLR_DATA_FDRII|inbox/LOC_DATA_FDRII||STORE_DATA" ) DO FOR /F "eol=' delims=" %%G IN ("%%a") DO ( SET "L=%%~G" REM add a backslash (or other character) in front of ev...
- 18 Sep 2021 08:04
- Forum: DOS Batch Forum
- Topic: Array construction with empty value
- Replies: 9
- Views: 6954
Array construction with empty value
Hi Folks - This may be a stupid question. I have the following array: FOR %%a IN ( "FDR|DLR_DATA_FDRII,DLR_DATA_FDRII|inbox/LOC_DATA_FDRII|REPLACE|STORE_DATA" ) DO FOR /F "tokens=1-4 delims=|" %%A IN (%%a) DO ( SET "STR[%%A].DLR=%%B" SET "STR[%%A].LOC=%%C" SET "STR[%%A].IMP=%%D" SET "STR[%%A].EXP=%%...
- 18 Sep 2021 07:57
- Forum: DOS Batch Forum
- Topic: Question with Array setup
- Replies: 12
- Views: 8138
Re: Question with Array setup
Thanks Squash and Aacni - both options worked great!
- 13 Sep 2021 09:06
- Forum: DOS Batch Forum
- Topic: Question with Array setup
- Replies: 12
- Views: 8138
Re: Question with Array setup
Squash, thank you sir. That seemed to do the trick!!
Now one more question, if perhaps the string on the RIGHT side of the file, like this:
Now one more question, if perhaps the string on the RIGHT side of the file, like this:
Is it also possible to search that way too?20210913_FDRBS.csv
- 13 Sep 2021 08:40
- Forum: DOS Batch Forum
- Topic: Question with Array setup
- Replies: 12
- Views: 8138
Re: Question with Array setup
Thanks, Squash! What do you mean "subtract"?
I'll also review the threads on how to properly break out of a loop.
I'll also review the threads on how to properly break out of a loop.
- 13 Sep 2021 07:58
- Forum: DOS Batch Forum
- Topic: Question with Array setup
- Replies: 12
- Views: 8138
Re: Question with Array setup
Squash -
Absolutely I can. But there will be situationnwhere I won't have the delimiter to use and will be stuck with this situation that I'm hopping to solve with some additional logic
Absolutely I can. But there will be situationnwhere I won't have the delimiter to use and will be stuck with this situation that I'm hopping to solve with some additional logic
- 13 Sep 2021 06:44
- Forum: DOS Batch Forum
- Topic: Question with Array setup
- Replies: 12
- Views: 8138
Re: Question with Array setup
Thanks, T, but that didn't work.
Lets say I have FDRBS_20210912.csv. it's still returning the array definition for the FDR line, not the FDRBS definition.
Lets say I have FDRBS_20210912.csv. it's still returning the array definition for the FDR line, not the FDRBS definition.
- 13 Sep 2021 03:24
- Forum: DOS Batch Forum
- Topic: Question with Array setup
- Replies: 12
- Views: 8138
Re: Question with Array setup
Thanks, T! Where would I add that character? To the array itself when it initializes?
- 12 Sep 2021 16:02
- Forum: DOS Batch Forum
- Topic: Question with Array setup
- Replies: 12
- Views: 8138
Question with Array setup
Hi Folks - I have a unique situation that I'm wondering how to solve. I have an array and i'm initializing as follows: FOR %%a IN ( "FDR|DLR_DATA_FDRII,DLR_DATA_FDRII|inbox/LOC_DATA_FDRII|REPLACE|STORE_DATA" "FDRBS|DLR_DATA_FDRII,DLR_DATA_FDRII|inbox/LOC_DATA_FDRII|REPLACE|STORE_DATA" "FDRCS|DLR_DAT...
- 12 Sep 2021 14:44
- Forum: DOS Batch Forum
- Topic: Scratching my head with this Function behavoir....
- Replies: 3
- Views: 3875
Re: Scratching my head with this Function behavoir....
Gotchya, Shadow. Makes sense. I'll update my script and retry.
Thank you for the feedback!
Thank you for the feedback!