1
I have a daily/monthly process where, I have a . txt that has a list of about 10,000 file Ids (one ID per line)
(exemplo_content_file . txt)
{
12345
23456
34567
45678
56789
}
Each file ID (ex: 12345) of . txt corresponds to an . xml file (File_12345_0.xml) that is in a server folder (server02) along with 200,000 other . xml files that I’m not interested in.
I want to create a .bat that by the Ids I have in . txt, find and play in a folder only the . xml with the . txt Ids.
Roughly speaking, I think it would be logical.
rode a for to take the first ID of the first line of . txt and use it as a parameter to find the file. xml inside server02, if found, I want to move this file to a folder "PASTA_ARQUIVOS_DESEJADOS"
for (1=0 ; 1>Quantity_ids_txt ; i++)
{
Variable XXX = PICK UP FIRST ID (WHICH CORRESPONDS TO i LINE);
Se (PROCURAR .XML QUE O NOME POSSUA *XXX*.xml e encontrar){
Mover Arquivo_<b>X</b> para C:\USER\PASTA_ARQUIVOS_DESEJADOS
}
Se não{
registrar no arquivo LOG.txt a string "ARQUIVO XXX não encontrado"
}
Please, could someone help me? I need to pass this logic to a . bat logic. I could do it in a c#, but in . bat do not give no. I thank you in advance!
Laercio, I made a comment in my own question to be able to attach an image, so you will understand better. Could you help me with this question? Hugs and thanks for your attention
– Bueno