Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Concatenate two variables  (Read 4019 times)

0 Members and 1 Guest are viewing this topic.

Raymond

  • Guest
Concatenate two variables
« on: August 16, 2004, 11:17:31 AM »
Hi,
    I have a variable predefined, let's call it Apples.  I want to move all files with this as the prefix followed by _TEST followed by anything and then .zip to a differnt directory i.e.

IF EXIST %Apples%_TEST*.zip MOVE %Apples%_TEST*.zip .\Zipped

It's not working, how do I do this?

Thanks.

Raymond

merlin_2

  • Guest
Re: Concatenate two variables
« Reply #1 on: August 16, 2004, 03:27:39 PM »
you may find the answer here>http://home7.inet.tele.dk/batfiles/

Raymond

  • Guest
Re: Concatenate two variables
« Reply #2 on: August 16, 2004, 04:06:46 PM »
Thanks, since you sound confident of where to find it, wanna give me a tip as to what to search for on the webpage?  I.e. "variable"?

Thanks.

MalikTous

  • Guest
Re: Concatenate two variables
« Reply #3 on: August 16, 2004, 06:02:59 PM »
Looks like you need to put the filespecs in quotes.

IF EXIST "%Apples%_TEST*.zip" MOVE "%Apples%_TEST*.zip" .\Zipped

This will force recognition of long file names.