Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

342
Visualizações
In UiPath, using Invoke code activity I am trying to get files in a folder which are updated or modified in last 24hrs

These are the codes that I have tried

Dim myDirectory As new.IO.DirectoryInfo("C:\MyFolder") 

Dim myFiles() As String = myDirectory.GetFiles.OrderByDescending(Function(x) x.LastWriteTime).Select(Function(x) x.FullName).Take(40).ToArray

MsgBox(String.Join(Environment.NewLine, myFiles)

Here since I am giving Take(40), it will be taking only last 40files, but I want which can take all files which are modifies in last 24hrs(it may be 100 or 1000)

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

If you want to find all the files that were modified in the last 24 hours you can use a StudioX activity to loop through each file and then use the LastModifiedDate method to find the data they were modified.

First, you will need to click Show StudioX activities in the Activities window filter.

enter image description here

Then, select the For Each File in Folder activity.

enter image description here

After that, use this formula in the If activity: Convert.ToDateTime(CurrentFile.LastModifiedDate()) > Now.AddDays(-1)

enter image description here

In this example, the name of any file that was modified in the last 24 hours will show up in a message box.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda