› Foros › Retro y descatalogado › Arcade y emulación
todocontra escribió:@Retrodanuart y sera que alguien con conocimiento pueda hacer el dicho script ? yo tengo el romset de la mame 261 pero solo me interesa los juegos de la lista del arcade 261 pero no tengo idea de como hacer el script para quitar pasar o mover a otra carpeta solo dichos archivos
InputBox, UserInput, EXTENSION DE FICHEROS (sin punto),,, 300, 100
if ErrorLevel
Exitapp
inputFile := "gamelist.txt"
outputFile := "gamelist_modified.txt"
FileRead, fileContent, %inputFile%
modifiedContent := ""
Loop, parse, fileContent, `n, `r
{
currentLine := A_LoopField
modifiedLine := SubStr(currentLine, 1, 18)
modifiedContent .= modifiedLine . "`n"
}
FileDelete, %outputFile%
FileAppend, %modifiedContent%, %outputFile%
inputFile := "gamelist_modified.txt"
outputFile := "gamelist_trimmed.txt"
FileRead, fileContent, %inputFile%
trimmedContent := ""
Loop, parse, fileContent, `n, `r
{
currentLine := A_LoopField
trimmedLine := RTrim(currentLine)
trimmedContent .= trimmedLine . "`n"
}
FileDelete, %outputFile%
FileAppend, %trimmedContent%, %outputFile%
inputFile := "gamelist_trimmed.txt"
outputFile := "gamelist_with_extension.txt"
FileRead, fileContent, %inputFile%
modifiedContent := ""
lineCounter := 0
totalLines := 0
Loop, parse, fileContent, `n, `r
{
totalLines++
}
lineCounter := 0
Loop, parse, fileContent, `n, `r
{
lineCounter++
if (lineCounter <= 3 || lineCounter > totalLines - 2)
continue
currentLine := A_LoopField
modifiedLine := currentLine . "."Userinput
modifiedContent .= modifiedLine . "`n"
}
FileDelete, %outputFile%
FileAppend, %modifiedContent%, %outputFile%
FileDelete, gamelist_modified.txt
FileDelete, gamelist_trimmed.txt
Exitapp