I am a bit grounded, I need to convert some Mass Spec Data with this program:
https://ccms-ucsd.github.io/GNPSDocumentation/fileconversion/ Data Conversion (Traditional)
My slightly modified code is this (works):
the original is working in a .bat file. That might be a problem--
cd 1_Input_Folder
FOR %%i IN (*.mzXML, *.mzML, .raw, *.d, *.raw, *.RAW, *.wiff) DO (
..\Installation\pwizLibraries-and-Installation\pwiz_Leave-Alone\msconvert %%i --filter "peakPicking true 1-" --64 --mzXML -o ..\2_Output_Folder --outfile %%~ni.mzXML >> ../log.txt 2>&1
)
FOR /D %%i IN (*.mzXML, *.mzML,*.raw, *.d, *.raw, *.RAW, *.wiff) DO (
..\Installation\pwizLibraries-and-Installation\pwiz_Leave-Alone\msconvert %%i --filter "peakPicking true 1-" --64 --mzXML -o ..\2_Output_Folder --outfile %%~ni.mzXML >> ../log.txt 2>&1
)
cd ..
and my problem is that my input file contains multiple files in one file, so in my output I get the last extracted file.
I was thinking of a counter like this: https://www.rgagnon.com/gp/gp-batch-increment-a-counter.html
But I can't really figure out how to implement my existing code into it.
So I have modified it a bit as I can't figure out the process with a counter. Now my problem is that it generates the file with the date (seems good) but overwrites it. I am missing a part in the script here :/
@echo
cd "D:\@Convert_Analyst\GNPS_Vendor_Conversion\1_Input_Folder"
set Time=%time:~0,2%.%time:~3,2%.%time:~6,2%
FOR %%i IN (*.mzXML, *.mzML, .raw, *.d, *.raw, *.RAW, *.wiff) DO (..\Installation\pwizLibraries-and-Installation\pwiz_Leave-Alone\msconvert %%i --filter "peakPicking true 1-" --64 --mzXML -o ..\2_Output_Folder --outfile %%~ni_%Time%.mzXML >> ../log.txt 2>&1)
FOR /D %%i IN (*.mzXML, *.mzML,*.raw, *.d, *.raw, *.RAW, *.wiff) DO (..\Installation\pwizLibraries-and-Installation\pwiz_Leave-Alone\msconvert %%i --filter "peakPicking true 1-" --64 --mzXML -o ..\2_Output_Folder --outfile %%~ni_%Time%___.mzXML >> ../log.txt 2>&1)
I am guessing I need to add the code in a loop but I don't know how :/
Edit: the folder cd "D:\@Convert_Analyst\GNPS_Vendor_Conversion\1_Input_Folder"
starts with @ as the folder name.
Anyone has an idea?
BR Tim