Search found 5 matches

by dossod
01 Mar 2013 19:36
Forum: DOS Batch Forum
Topic: delims question
Replies: 8
Views: 8111

Re: delims question

The for loop with the reassignment of %%a worked fine. It doesn't give me the option of using multiple multi-character strings, but using one long one multiple times is nearly as good. Yes Perl can be installed on a PC, and I have done so in the past. But while I play on my PC I don't do enough on i...
by dossod
28 Feb 2013 22:23
Forum: DOS Batch Forum
Topic: delims question
Replies: 8
Views: 8111

Re: delims question

Got it! rem Starting string is thisxismyxy xyz filex xyz xyeah setlocal enabledelayedexpansion for /f "tokens=*" %%a in (filesToRen.txt) do ( echo Moving %%a set newString=%%a set "newString=!newString: xyz =.!" echo "!newString!" ) Returns: Moving thisxismyxyxyzfilexxy...
by dossod
28 Feb 2013 20:05
Forum: DOS Batch Forum
Topic: delims question
Replies: 8
Views: 8111

Re: delims question

My "solution" was also a red herring. Using the delims I showed above; thisxismyxy xyz filex xyz xyeah returns this ism file Edit: I don't think foxidrive's solution will work for me because of the nature of what I'm trying to do. I'm attempting to read directories and substitute parts of ...
by dossod
28 Feb 2013 19:28
Forum: DOS Batch Forum
Topic: delims question
Replies: 8
Views: 8111

Re: delims question

Figured it out, sort of. I can do this and have it split on xyz tokens=1,2,3 delims=(xyz) so this myxyzfilexyzhere can become my file here and that's a big improvement, but I still haven't gotten it to work on two multi-character delims or more properly, "tokens=1,2,3 delims=(foo)" just to...
by dossod
28 Feb 2013 19:04
Forum: DOS Batch Forum
Topic: delims question
Replies: 8
Views: 8111

delims question

I'd like to use delims to have my tokens separated by strings instead of a single character. For instance, in the string below foo and bar would be my delims thisfooisbarmyString So token 1 would be this, 2 is, 3 myString However this would only work if I can get delims to use multi-character string...