recaltools icon indicating copy to clipboard operation
recaltools copied to clipboard

System Select

Open dan-parker opened this issue 7 years ago • 3 comments

Had an issue w/the system select having odd paths, and looping back to the system selection. Rewrote the Sub as

:SUB_folderBrowser
echo.
echo %dict[9]%

rem PowerShell-Subroutine to open a Folder Browser
set "psCommand="(New-Object -COM Shell.Application)^
.BrowseForFolder(0,'%dict[22]%.',0,0).self.name""
for /F "usebackq delims=" %%i in (`PowerShell %psCommand%`) do set "newRoot=%%i"

set "romsDir=%newRoot%"
set "system=%newRoot%"
cls & echo %dict[12]% %romsDir%
rem Check if scraping from network drive and show warning about stopping ES
if not x%romsDir:\\=%==x%romsDir% echo %dict[13]%
echo. & goto modeSelection

dan-parker avatar Sep 18 '18 03:09 dan-parker

Could you please give me an example of and “odd path” so I can try to reproduce it before changing the code?

paradadf avatar Sep 18 '18 10:09 paradadf

After doing cd and getting the folder select, it loops back to the system select. Selecting all after that continues, but %system% isn't set, so the loop running scraper never happens. I added an echo %system% right before the loop in the main code section to check this. This is the output:

Selected roms folder: H:\recalbox\roms\lynx

Which system(s) do you want to scrape? Type "all" for all systems or "cd" to open the folder browser.
all
Would you like to append existing gamelists? [Y/N]: n
System:
Start           : 17:51:42.17
Finish          : 17:51:42.17
                ---------------
Duration        : 00:00:00,00

Nothing scraped, when working through some code changes even if the rompath got passed, it impacted the paths passed to the scraper,doing things like: -image_dir="H:\recalbox\roms\lynx\./downloaded_image"

So I tried to make the single selection pass just the foldername, not the whole path, and set the variables, so to loop it was just like a single folder existing in the base roms path

Hopefully that makes sense

dan-parker avatar Sep 19 '18 01:09 dan-parker

I’ll check it asap... thank you very much for the code and explanation!

paradadf avatar Sep 19 '18 10:09 paradadf