CodeExtract.bat

提取source insight搜索到的内容


::@echo off
set SearchResults=E:\Projects\MH610_A\MH610_A_20101118_Verify\MH610_A_20101118_Verify.SearchResults
set DstDirectory=c:\fww\
set SrcDirectory=E:\Projects\MH610_A\MH610_A_20101118_Verify\09BW0952MP_MALATA35_09B_V2_F1_gprs_MMI\



	::拷贝路径名和文件名
	for /f "eol=- tokens=1 delims=)" %%i in (%SearchResults%)do (
	echo %%i>>temp.txt
	)


	::提取路径名并建立目录
	for /f "tokens=2 delims=(" %%i in (temp.txt)do (
	if not exist "%DstDirectory%%%i" (md "%DstDirectory%%%i")
	)

	::提取完整文件名,并且拷贝
	for /f "tokens=1,2 delims=(" %%i in (temp.txt)do (
	if not exist "%DstDirectory%%%j\%%i" (copy "%SrcDirectory%%%j\%%i" "%DstDirectory%%%j\%%i")
	)	 

	del temp.txt

	echo 操作已完成!
	pause
	


你可能感兴趣的:(CodeExtract.bat)