

InterviewSolution
1. |
Solve : Batch file to find a specific space and delete it? |
Answer» Hello all, echo off I think OP will not ever have such situations, but just for resiliency and completeness, i am sure the above can be made to remove more than 1 space eg Code: [Select]\Rock and Roll\Music \Dance Quote from: gh0std0g74 on July 26, 2009, 07:40:43 PM I think OP will not ever have such situations, but just for resiliency and completeness, i am sure the above can be made to remove more than 1 space eg Code: [Select]set string=%string:abc=xyz% The first string, represented above as "abc" (the one to be replaced) can be any* nonzero length and the second string , represented above as "xyz" (the replacement string) can be of any length from zero upwards, that is, a zero length second string results in every instance of the first string being deleted. They don't have to be the same length. *I say "any" length; obviously there'll be a limit, a POWER of 2 minus 1, 255 or 65535 I expect. |
|