In Windows XP, I want it to copy the only file matching the pattern, selenium*.jar to a local directory.
I have tried:
pushd \\remote.mydomain.com\selenium\
FOR %f IN (selenium*.jar) DO copy %f C:\selenium
in which \\remote.mydomain.com is a shared directory, whose contents are hosted on a remote server.
But I get the error:
C:\selenium>pushd \\remote.mydomain.com\selenium\
f was unexpected at this time.
Replace
%fwith%%fin your script.%fworks only if you entering the command directly at the command prompt, but not in a batch file. And typinghelp foron the command line shows you the manual where this behaviour is described in the second paragraph.