PC Review


Reply
Thread Tools Rate Thread

Using 'for' with variable substitution

 
 
Edward Diener
Guest
Posts: n/a
 
      20th Jan 2005
In a batch file I have a line such as:

for %%~nA in ("C:\somedirectory\somefile") do set MYENV=%%A

When I run this batch file I get the message:

"%~nA was unexpected at this time."

I can not figure out why this syntax is not accepted by the command
processor. I am running with command extensions set on.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell/Variable content substitution Jim Microsoft Excel Programming 3 21st Aug 2009 07:16 PM
Using 'for' with variable substitution Edward Diener Windows XP General 2 21st Jan 2005 06:22 PM
Variable substitution in object name? Brian Newman Microsoft VB .NET 1 8th Oct 2004 06:39 PM
VARIABLE SUBSTITUTION Robert Lowe Microsoft Excel Programming 3 23rd Apr 2004 04:46 PM
Substitution within a substitution? Dennis Steinauer Microsoft Frontpage 1 8th Apr 2004 11:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:01 AM.