PC Review


Reply
Thread Tools Rate Thread

Batchfile substitution syntax question

 
 
John
Guest
Posts: n/a
 
      28th Apr 2010
I want the my bacthfile code to produce (including the spaces):
copy /y "c:\this dir\this file.txt" d:
copy /y "c:\next dir\next file.txt" d:
copy /y "c:\last dir\last file.txt" d:
Instead, I just get code with the set var names;
copy /y "c:\x1" d:
copy /y "c:\x2" d:
copy /y "c:\x3" d:
How do I correct my "c:\x%%a" substitution syntax in the following code to
produce the correct copy stmt?
@echo off
set x1=c:\this dir\this file.txt
set x2=c:\next dir\next file.txt
set x3=c:\last dir\last file.txt
for /L %%a in (1,1,3) do (
echo copy /y "c:\x%%a" d:
)
I appreciate your help, -John

 
Reply With Quote
 
 
 
 
Twayne
Guest
Posts: n/a
 
      28th Apr 2010
For the best batchfile information, try alt.msdos.batch.nt where the
best responses can be had.

HTH,

Twayne`


In news:ADD584C5-129F-41D4-A2CA-(E-Mail Removed),
John <(E-Mail Removed)> typed:
> I want the my bacthfile code to produce (including the
> spaces):
> copy /y "c:\this dir\this file.txt" d:
> copy /y "c:\next dir\next file.txt" d:
> copy /y "c:\last dir\last file.txt" d:
> Instead, I just get code with the set var names;
> copy /y "c:\x1" d:
> copy /y "c:\x2" d:
> copy /y "c:\x3" d:
> How do I correct my "c:\x%%a" substitution syntax in the
> following code to produce the correct copy stmt?
> @echo off
> set x1=c:\this dir\this file.txt
> set x2=c:\next dir\next file.txt
> set x3=c:\last dir\last file.txt
> for /L %%a in (1,1,3) do (
> echo copy /y "c:\x%%a" d:
> )
> I appreciate your help, -John




 
Reply With Quote
 
John
Guest
Posts: n/a
 
      28th Apr 2010

I'm pretty green at this discussion groups thing. How do I access
alt.msdos.batch.nt? I've never used a newsreader, just use IE8.

I tried downloading Grabit & signed up for the service, but I can't get it
to work.

Any help would be appreciated. -John
 
Reply With Quote
 
Pegasus [MVP]
Guest
Posts: n/a
 
      28th Apr 2010


"John" <(E-Mail Removed)> wrote in message
news:219CDF62-DC0A-40E7-9E64-(E-Mail Removed)...
> I'm pretty green at this discussion groups thing. How do I access
> alt.msdos.batch.nt? I've never used a newsreader, just use IE8.
>
> I tried downloading Grabit & signed up for the service, but I can't get it
> to work.
>
> Any help would be appreciated. -John


You're doing yourself a disservice by using a browser for a newsreader. Much
easier to use a proper newsreader, e.g. Outlook Express. Ask your provider
for the name of his news server - it is usually something like
news.MyISP.com. Now check this guide
http://michaelstevenstech.com/outloo...snewreader.htm but replace
msnews.microsoft.com with your ISP's news server. After selecting the
newsgroup that John mentioned, create your own post. Remember to post *all*
relevant details when asking a question. Respondents get turned off when
confronted with a "creeping scope" question because it tends to waste a lot
of time.

 
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
Newbie: simple substitution question =?Utf-8?B?TWFydA==?= Microsoft Access Queries 1 25th Jul 2006 03:06 PM
BatchFile parser Tafv Windows XP 1 20th Jul 2005 10:08 PM
VB substitution question MattB Microsoft ASP .NET 2 21st Dec 2004 05:33 PM
Bonehead batchfile question Craig Microsoft Windows 2000 CMD Promt 16 13th Sep 2004 08:48 PM
Batchfile with xcopy Volker Jobst Microsoft VB .NET 5 17th Feb 2004 11:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:25 PM.