Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
strip string character by character
Name: vascobrito Date: June 10, 2004 at 12:06:25 Pacific OS: MsDos 5 CPU/Ram: 486
Comment:
hi there I need a way to separate a string inputed by user. Like this: teste.bat abcde I need to separate each character from the string and assign it to a variable, since i need to use those characters separatly. how can i do this? thanks for any help
Name: Mechanix2Go Date: June 10, 2004 at 21:35:16 Pacific
Reply:
Hi, vascobrito
With DOS 5 internals only, I can see no way. There are a few small utilities that will help.
How long a user string do you need to process?
Mechanix
0
Response Number 2
Name: vascobrito Date: June 11, 2004 at 03:23:49 Pacific
Reply:
Well, i found a way that requires qbasic. But i was in fact trying to do it only with dos. The user input's a five digit number, that i would have to increment this number by one. ex. user input : 20010 i will get a file called m20010.txt with ftp, and then i need to get the next one, so the idea is to increment that number to 20011, and the get the m20011.txt file. I can increment the number but the method requires to separate each digit and increment each digit if necessary. what i don't know is how to to separate 20010 in "2 0 0 1 0" to. I still would prefer to do it using only dos. thanks
Summary: First of all, that's not exately the script I suggested. The script in this subject is the right one (you had some posting problems and the line with the FIND cmd was changed, affecting the whole scri...
Summary: Sorry, but I got my know how just reading the in-famous on-line help. Many people is looking for such a source of knowledge, but that seems to be like the Holy Graal. May be a day I may write a book o...
Summary: When you start a batch file, you can pass it a series of parameters. Each parameter is a text string separated by spaces. How do you access these parameters within the batch file? The "%1" in the bat...