MOVE CONDITION-BASED FILE - MOVER ARQUIVO BASEADO EM CONDIÇÕES

HELLO GUYS!
DOES ANYONE KNOW HOW I CAN MOVE FILES BASED ON CONDITIONS?
IN PRACTICE IT WOULD BE:
I HAVE THESE FILES AND ARE RELATED TO DIFFERENT COMPANIES.
_BASF
_PRINER


OLÁ, PESSOAL!
ALGUÉM SABE COMO EU POSSO MOVER ARQUIVOS BASEADO EM CONDIÇÕES?
NA PRÁTICA SERIA:
EU TENHO ESSES ARQUIVOS E ESTÃO RELACIONADOS A EMPRESAS DIFERENTES.
_BASF
_PRINER

*image *

I NEED TO MOVE THEM TO THE SPECIFIC FOLDERS OF EACH COMPANY.
_________________________________________________________________________________emphasized text
EU PRECISO MOVER ELES PARA AS PASTAS ESPECIFICAS DE CADA EMPRESA.

I ALSO HAVE AN EXCEL WHERE I READ THE NAME OF THE FILES THAT ARE IN THIS DIRECTORY AND SHOW THE COMPANY IT IS RELATED TO.


EU TENHO TAMBÉM UM EXCEL ONDE EU LEIO O NOME DOS ARQUIVOS QUE ESTÃO NESSE DIRETÓRIO E MOSTRA A EMPRESA QUE ELE ESTÁ RELACIONADO.

ANEXO TIPO 1.xaml (61.6 KB)

@danielle.freitas - Are you trying in Studio or StudioX? if Studio, please correct your post tag, it is wrongly tagged as StudioX.

@danielle.freitas

First get the file name and check whether the file name contains _BASF then place move file activity, else, make another IF filename contains _PRINER place move file activity

File.Contains("_BASF")

Also you can place switch case if you have many folder instead of placing many IF conditions

Hope this helps you

Thanks

THANK YOU FOR YOUR HELP!
BUT IT’S NOT WORKING.


OBRIGADA PELA AJUDA!
MAS, NÃO ESTÁ FUNCIONANDO.

image

ANEXO TIPO 1.xaml (62.2 KB)

SORRY!
CHANGE ACCOMPLISHED!

@danielle.freitas

CHECK AS BELOW

Hope this helps you

Thanks

REALLY THANK YOU!
BUT THE PROBLEM IS THAT MOVE FILE’S ACTIVITY IS NOT FINDING THE FILES. I ONLY POSTED THE FILE DIRECTORY LINK BECAUSE I NEED IT ALWAYS READ THERE, BECAUSE NEW FILES WILL BE ADDED PERIODICALLY.


REALMENTE OBRIGADA!
MAS, O PROBLEMA É QUE A ATIVIDADE DE MOVE FILE NÃO ESTÁ ENCONTRANDO OS ARQUIVOS. EU COLOQUEI APENAS O LINK DO DIRETÓRIO DOS ARQUIVOS POIS EU PRECISO QUE ELE SEMPRE LEIA LÁ, POIS NOVOS ARQUIVOS SERÃO ADICIONADOS PERIODICAMENTE.

ERROR:

RemoteException wrapping System.IO.FileNotFoundException: Could not find file ‘C:\Users\FreitaD2\Documents\SAP\SAP GUI’.
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
atSystem.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)atSystem.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

@danielle.freitas - Inside the move activity you have to give just ‘FILE’ which is in the For Each…

SORRY, I’M BEGINNING IN UIPATH.
I DIDN’T UNDERSTAND WHAT YOU WANTED TO SAY.
HAVE HUNDREDS OF FILES IN THIS DIRECTORY OF DIFFERENT COMPANIES AND THE IDEA IS THAT IT IS ALWAYS PLACED THEN THE ROBO ORGANIZES THEM. SO I CANNOT SPECIFY ONLY ONE FILE TO MOVE.

image

@danielle.freitas - A kind suggestion, please use lower case when you reply…If you use all upper case, it means you are angry/irritated :slight_smile:

Next, to understand what is happening inside the for loop, first comment everything inside the for each and just put write line and say File. But before that, change the For each type argument to String.

Now you will see what is happening.

I have a problem with my keyboard, so the capital letters. hahaa thanks for the suggestion. I will try now.
:smile:

Hi!! thank you!
I follow your recommendation. I made some adjustments, but the problem now is that the folder I intend to move files on is not being recognized by uipath. have you seen this error?

@danielle.freitas - something in the workflow got messed up.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.