aideb
asked on
Help with line in batch file
I need a quick hand with a line in a batch file
If %Source% == %Destin% %Destin% = %Destin%+".000"
It isn't working as intended.
It should (in my mind anyway) compare the two variables. If the two match, the Destin variable should have .000 appended.
e.g. JSmith becomes Jsmith.000
Thanks
Aidan
If %Source% == %Destin% %Destin% = %Destin%+".000"
It isn't working as intended.
It should (in my mind anyway) compare the two variables. If the two match, the Destin variable should have .000 appended.
e.g. JSmith becomes Jsmith.000
Thanks
Aidan
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Result!
Thanks
Thanks
Example
set Source=234
set Destin=234
If NOT "%Source%"=="%Destin%" GOTO NextStep
Set Destin=%Destin%.000
:NextStep
echo %Destin%
If %Source% == %Destin%
%Destin% = %Destin%+".000