@echo off
setlocal enabledelayedexpansion
Call "%~dp0\FilePath.bat" %3

call "%~dp0\INIReader.bat" "%~dp0\~temp.ini"


set Target=%DirectoryPath%Content\
set Targetp=%Target%
Call "%~dp0\FilePath.bat" %[set]pic%
set Original=%DirectoryPath%%FileNameWithoutExtension%

set Target=%Target%%FileNameWithoutExtension%
set o_t_a=%AbsolutePath%
Call "%~dp0\FilePath.bat" %[set]FILE%

set o_t_b=%AbsolutePath%
set Target_name=%FileNameWithoutExtension%
set Target_exc=%FileExtension%

if %o_t_a%==%o_t_b% (
	set Original=%o_t_a%
	set Target=%Targetp%
	call :bb
	exit
	)

%－－－－－－－－－非贴图 开始－－－－－－－－－－%
set TargetA=%Target%
set ii=0

call :aa
:aa
if not exist "%TargetA%" (	
	md "%TargetA%"
	set Target=%TargetA%
)else (
	set  TargetA=%Target%!ii!
	set /a ii+=1 
	goto :aa
)
%－－－－－－－－－非贴图　结束－－－－－－－－－－%


echo "-------------------"

echo %Target%
echo %Original%
xcopy "%Original%" "%Target%"
exit
:bb

%－－－－－－－－－贴图 开始－－－－－－－－－－%

set TargetA=%Target%
set ii=0

call :cc
:cc
if not exist "%TargetA%%Target_name%%Target_exc%" (	

	set Target=%TargetA%%Target_name%%Target_exc%
)else (

	set  TargetA=%Target%!ii!
	set /a ii+=1 
	goto :cc
)
%－－－－－－－－－贴图　结束－－－－－－－－－－%

echo %Target%
echo %Original%
copy "%Original%" "%Target%"
exit