Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System Select #17

Open
dan-parker opened this issue Sep 18, 2018 · 3 comments
Open

System Select #17

dan-parker opened this issue Sep 18, 2018 · 3 comments

Comments

@dan-parker
Copy link

dan-parker commented Sep 18, 2018

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
@paradadf
Copy link
Owner

paradadf commented Sep 18, 2018

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

@dan-parker
Copy link
Author

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

@paradadf
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants