
CODE: [Copy to clipboard][ Last edited by netbenton on 2009-5-23 at 10:15 ]@echo off&setlocal enabledelayedexpansion
set true=y
for /f "delims=" %%a in (NCBI.gb) do (
for /f "tokens=1,2" %%b in ("%%a") do (
if "%%b" equ "LOCUS" (
if defined true set name=%%c.seq
set true=
)
if "%%b" equ "//" (set true=y)
)
echo %%a>>!name!
)
pause
CODE: [Copy to clipboard]@echo off&setlocal enabledelayedexpansion
for /f "delims=" %%i in (NCBI.gb) do (
if "%%i"=="//" (
call :label ###.txt
) else (
echo %%i>>###.txt
)
)
pause
:label
for /f "tokens=2" %%a in (%1) do ren %1 %%a.seq && goto :eof
CODE: [Copy to clipboard]@echo off&setlocal enabledelayedexpansion
for /f "eol=/ delims=" %%a in (sequences.gb) do (
set var=%%a
if "!var:~,5!"=="LOCUS" for /f %%a in ("!var:~5!") do set name=%%a.gb
>>!name! echo %%a
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |