Home / Microsoft / Microsoft DOS / deference between % !
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: deference between % !  (Read 3955 times)
.bat_man
Topic Starter
Beginner



Posts: 86

Will Smith

« on: April 08, 2008, 02:50:50 AM »

i need to distinguish between  %variable% and !variable!
can any one till me in what they differ
IP logged
Dias de verano
Guest
« Reply #1 on: April 08, 2008, 04:05:44 AM »

!variable! is using delayed expansion
IP logged
.bat_man
Topic Starter
Beginner



Posts: 86

Will Smith

« Reply #2 on: April 08, 2008, 04:45:03 AM »

what do u men by delayed expantion
is it for geting system variablers that take delay to be returned
IP logged
Dias de verano
Guest
« Reply #3 on: April 08, 2008, 10:27:24 AM »

read this page

http://www.robvanderwoude.com/variableexpansion.html
IP logged
.bat_man
Topic Starter
Beginner



Posts: 86

Will Smith

« Reply #4 on: April 09, 2008, 12:54:34 AM »

i Appreciate ur help, its realy wonderful put can i ask for somthing else that is
the %~f0 and any other variables like it '%~'  and its meaning or give me webpage i can find them in 
IP logged
Dias de verano
Guest
« Reply #5 on: April 09, 2008, 02:04:55 AM »

type

Code: [Select]
for /?
at the prompt
IP logged
.bat_man
Topic Starter
Beginner



Posts: 86

Will Smith

« Reply #6 on: April 09, 2008, 02:50:52 AM »

thanks alot
u mean that in stead of putting the for loop variable 'I' put 0 and it will work out side the for loop like that
%~f0
instead of
%~fI inside the for loop
IP logged
Dias de verano
Guest
« Reply #7 on: April 09, 2008, 10:15:19 AM »

thanks alot
u mean that in stead of putting the for loop variable 'I' put 0 and it will work out side the for loop like that
%~f0
instead of
%~fI inside the for loop

You use letters of the alphabet %%a to %%z and %%A to %%Z for loop variables and you use figures %1 to %9 for parameters passed to the batch file from the command line. %0 has a special meaning, it expands to the batch file's own name.
IP logged
.bat_man
Topic Starter
Beginner



Posts: 86

Will Smith

« Reply #8 on: April 10, 2008, 12:58:50 AM »

thanks a lot
i appreciate ur help
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / deference between % ! « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.08 seconds with 20 queries.