Author Topic: [Script] Create a quick favorite list  (Read 6885 times)

arthurvalenca

  • Sr. Member
  • ****
  • Posts: 125
    • View Profile
[Script] Create a quick favorite list
« on: January 21, 2021, 04:17:56 AM »
Here is a script that will help many people to easily and quickly create the list of favorites with file backup, this script was developed by a member of the forum "StackOverflow BR" All credits of the script to the friend "It Wasn't Me", basically you should copy the code below and save it as .bat or .cmd, change to the path of your "Romlists", where the .tag files are stored and execute the script.

Original Version Full Speed Link:

https://pt.stackoverflow.com/a/491128/131559



Code: [Select]
@echo off

set /a "_tag=0"
set /a "_num=0"

rem *Place " " Place the path of your romlist folder.

cd /d "D:\AM-2.6.1\Romlists"

setlocal EnableDelayedExpansion

echo==========================================================
echo=    AM Favorites Romlist Generator Script for Windows
echo=      Created by - It Wasn't Me - StackOverflow BR   
echo==========================================================

if not exist .\favorites.txt (
     
      set /p "'= - Cretating .\Favorites.txt File.."<nul
      echo\
     
    )  else (
   
      set /p "'= - Backing up your old Favorites.txt: "<nul
      move /y .\Favorites.txt .\Favorites.txt.backup 2>nul >nul
      if %errorlevel% equ 0 echo\Done^!!
    )
     
echo/- Gathering list of your Favorites: Tags-Files

(echo #Name;Title;Emulator;CloneOf;Year;Manufacturer;Category;Players;Rotation;Control;Status;DisplayCount;DisplayType;AltRomname;AltTitle;Extra;Buttons;Series;Language;Region;Rating) > Favorites.txt

for %%G in (*.tag)do (
     
     set /a "_tag+=1"
     
     for /f useback^delims^= %%i in (`more "%%~G"`)do (
     
         set/p "'=- ROM Found in File %%~nxG: %%~i"<nul
         echo=
         
         find "%%~i;" <"%%~nG.txt" >>".\Favorites.txt"
         if %errorlevel% equ 0 set /a "_num=!_num!+1"
         
        )
    )

set /a "_num=!_num! + 1000"
set /a "_tag=!_tag! + 1000"

call echo/- Romlist Files [tag=txt]: !_tag:~-3!
echo/- Favorites added to Disc: !_num:~-3!
echo/- ROMlist .\Favorites.txt: New

endlocal
echo/- is Done!.. & timeout 5|findstr /ec:\.\Favorites\.txt "%~f0"
goto :EOF
« Last Edit: January 23, 2021, 09:36:39 AM by arthurvalenca »

jedione

  • Hero Member
  • *****
  • Posts: 1135
  • punktoe
    • View Profile
Re: [Script] Create a quick favorite list
« Reply #1 on: January 22, 2021, 06:06:28 AM »
thank you....bad ass..

ohh by the way.. i used to theme win 7 few years back, that ergo proxy was one of my fav...

any chance you could share that theme with me?...looks great
help a friend....

manzarek

  • Sr. Member
  • ****
  • Posts: 156
    • View Profile
    • YouTube
Re: [Script] Create a quick favorite list
« Reply #2 on: January 23, 2021, 01:42:03 PM »
Yes great
Mame Fighting

ToeMath

  • Jr. Member
  • **
  • Posts: 11
    • View Profile
Re: [Script] Create a quick favorite list
« Reply #3 on: May 02, 2021, 10:35:05 AM »
thank you

mono20

  • Jr. Member
  • **
  • Posts: 15
    • View Profile
Re: [Script] Create a quick favorite list
« Reply #4 on: May 23, 2023, 02:57:19 PM »
Muchas gracias