Quantcast
Channel: Windows 7 Miscellaneous forum
Viewing all articles
Browse latest Browse all 11372

Need help with replacing string in MS DOS Command line

$
0
0
Hi,

I would need to know how I can replace a string value that is stored in %servername% from the string in %taskname%?

set taskname=%taskname:%%servername%%\=%
(does not work)

Here is an example what is being achieved

taskname = bnp-s-3432\Restart server
servername = bnp-s-3432

So the result should be only "Restart server" (without quotes).

Regards,
Dejan



Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>