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
Variable substitution doobie Microsoft Excel Misc 1 9th Nov 2009 06:36 PM
OnClientClick Variable Substitution Jennifer Mathews Microsoft ASP .NET 0 28th May 2009 08:39 PM
Need help with Variable substitution =?Utf-8?B?QWw=?= Microsoft Access VBA Modules 2 30th Aug 2005 06:35 AM
Using 'for' with variable substitution Edward Diener Windows XP General 2 21st Jan 2005 06:22 PM
VARIABLE SUBSTITUTION Robert Lowe Microsoft Excel Programming 3 23rd Apr 2004 05:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:55 AM.