Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help and Spyware Removal Computer Help Forums Windows Startup Programs Database Spyware and Malware Removal Guides Computer Tutorials Uninstall Database File Database Computer Glossary Computer Resources
 

Welcome Guest ( Log In | Click here to Register a free account now! )



Register a free account to unlock additional features at BleepingComputer.com
Welcome to Bleeping Computer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.
Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Important Announcement: The winners of the BC Million Post contest have been announced. You can read who the winners are at this post.

- BleepingComputer Management
 
Reply to this topicStart new topic
> Another Batch Question [variables]
memorex2930
post Sep 3 2005, 05:28 PM
Post #1


New Member
*

Group: Members
Posts: 5
Joined: 18-August 05
Member No.: 31,552



i was wondering if it was possible to have a variable within a variable.

i have this section of code from my messeging program i'm making:

set /p user=Send To:
set /p m=Message:
net send %%user%% %m%

the Send To: thing lets you type in a person to send to (e.g. Bob)
well in the environment variables, Bob=(the computer number)
how can i get the net send to equal net send %Bob% %m% ?????

thanks for any help anybody can give me
Go to the top of the page
 
+Quote Post
bojo
post Sep 4 2005, 02:37 AM
Post #2


New Member
*

Group: Members
Posts: 1
Joined: 1-August 05
Member No.: 29,475



It's not possible to have "variable in variable" in batch files. Actually, I guess, it's only possible in advanced programming languages which batch programming is not.
Go to the top of the page
 
+Quote Post
memorex2930
post Sep 4 2005, 03:17 AM
Post #3


New Member
*

Group: Members
Posts: 5
Joined: 18-August 05
Member No.: 31,552



thanks for your help
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 22nd November 2008 - 04:17 AM


Advertise   |   About Us   |   Terms of Use   |   Privacy Policy   |   Contact Us   |   Site Map   |   Chat   |   Tutorials   |   Uninstall List
Discussion Forums   |   The Computer Glossary   |   Resources   |   RSS Feeds   |   Startups   |   The File Database   |   Malware Removal Guides

© 2003-2008 All Rights Reserved Bleeping Computer LLC.