|I need split one large file, which contains chemical structures of molecules into separated files for each molecule one.|
Important is, that every subfile is separated by $$$$
So the data look like: file test.sdf
and I need have separated files
I tried to write a script but it looks like it does not work. I will really appreciate if someone could help me. I am not comfortable with batch and rather use bash, but I need to learn something new...
here is my code:
FOR /f "delims=" %%a IN (test.sdf) DO (
IF "%%a"=="$$$$" (SET "output=Y"&SET "ext="
) ELSE (
IF DEFINED output (
IF NOT DEFINED ext FOR %%s IN (%extensions%) DO IF /i "%%a"=="%%s" SET "ext=%%s"