Tuesday, July 8, 2014

Clean string returned by windows console cmd

Hi,


I obtain this string that I would like to clean :

^Af><fe>D^Ae^Av^Ai^Ac^Ae^AI^AD^A ^A ^A
^AC^A:^A ^A ^A ^A ^A ^A ^A ^A ^A
^AD^A:^A ^A ^A ^A ^A ^A ^A ^A ^A
^AE^A:^A ^A ^A ^A ^A ^A ^A ^A ^A
^AF^A:^A ^A ^A ^A ^A ^A ^A ^A ^A
^AG^A:^A ^A ^A ^A ^A ^A ^A ^A ^A
^AH^A:^A ^A ^A ^A ^A ^A ^A ^A ^A
^AI^A:^A ^A ^A ^A ^A ^A ^A ^A ^A
^AZ^A:^A ^A ^A ^A ^A ^A ^A ^A ^A
^A




This is obtained by launching this command :
echo system("wmic logicaldisk get deviceid")

I would like to get a list of drives on windows seven :

C:, D: etc..

Thank you

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment