Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

203
Views
cómo usar múltiples comandos en for loop

Mi código actual es:

 function OnClick(data){ var files = data.func.sourcetab.selected_files; var cmd = data.func.command; cmd.ClearFiles(); var re = new RegExp("(.*) - ([0-9]*) - (.*)(\.mp3|\.flac)"); for(var i=0;i<files.count;i++){ // DOpus.Output("File: [" + files(i).name+"]"); var matches = String(files(i).name).match(re); // if (!matches){ DOpus.Output(" skipped"); continue; } var artist = matches[1]; var track = matches[2]; var title = matches[3]; var cmdli = 'SetAttr META="artist:'+artist+'" "track:'+track+'" "title:'+title+'" FILE="'+files(i).realpath+'"'; //DOpus.Output(" cmd: " + cmdli); cmd.RunCommand(cmdli); // cmd.RunCommand('Rename FROM="'+ files(i) +'" TO="' + title + '" IGNOREEXT'); } for(var i=0;i<files.count;i++){ var matches = String(files(i).name).match(re); var title = matches[3]; cmd.RunCommand('Rename FROM="'+ files(i) +'" TO="' + title + '" IGNOREEXT'); } }

Aquí he usado 2 for loop, el segundo for loop usado para ejecutar este comando cmd.RunCommand('Rename FROM="'+ files(i) +'" TO="' + title + '" IGNOREEXT'); ¿Hay alguna forma de ejecutar este comando en mi primer bucle for? Si puedo ejecutar este comando en 1st for Loop, entonces no necesito escribir el segundo comando for loop.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!