A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » Security and Administration with Windows XP
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Creating Batch File in WinXP



 
 
Thread Tools Display Modes
  #1  
Old December 4th 08, 07:23 PM posted to microsoft.public.windowsxp.security_admin
Bill
external usenet poster
 
Posts: 253
Default Creating Batch File in WinXP

Quick question. I'm new to creating batchfiles. To start off with, this is
what I have so far:

cd C:\Program Files\Test\
del config.xml
echo 222222 test.txt

Here is where my question comes into play at. The number listed above
(222222) is my PCID # which is found by opening up a command prompt and
executing the command dir and you get the following output:

Volume in drive C is Local Disk
Volume Serial Number is 2222-2222

What I would like to know is if there is a way I can extract the number
listed above and have it put into the file test.txt. I have to do this on
several PC's so the numbers will all be different so I can't just manually
tell it to echo the # to the file like I'm doing above. I want the batch
file to execute the dir command and extract the Volume Serial Number into a
file. Does anyone know of a way to do this?
Ads
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 09:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.