DukkyS
(DukkyS)
October 21, 2022, 1:17pm
1
Hello everybody, i am new to tho this and hope you guys can help me.
I would like to check every file in a specifiek directory (each one).
If the file is adjusted within 30 days. i would like to move it to a other directory file. if not i just want to leave it there.
can anybody help me out with this problem.
Hi @DukkyS ,
Please try this assign. This assign will give you the files which is earlier than 30 day before.
arrFiles = Directory.GetFiles(“YourFolderPath”).Where(Function(x) New FileInfo(x).LastWriteTime.Date < Today.Date.AddDays(-30))
You can put this list in for each and move them.
Regards.
Ömer
DukkyS
(DukkyS)
October 21, 2022, 1:37pm
4
thank you for your, fast reply.
I think i need to watch more tutorials before i continu.
I tried it but it gave a error.
I have no clue what i did wrong
Gokul001
(Gokul Balaji)
October 21, 2022, 1:38pm
5
Hi @DukkyS
You can try with For each file in Folder activity
Check out the Tutorial
Hello Everyone, Hope you are doing good
I would like to present this post who are looking for the File and Folder
Let Jump into the Tutorial
We are look into some Modern activities
Get Files in Folder
Get the specific folder
Get all the files in the subfolder
Get Directories
Get File and Folder Creation and Size
Get Files in Folder
Step 1 : Use Assign activity.
LHS : Create an variable | ProjectPath | Variable Type -> String
RHS : Environment.CurrentDirectory+"\"
Step …
Regards
Gokul
@DukkyS ,
If you want, you can share your screenshot.
I will try to help.
Regards.
Ömer
DukkyS
(DukkyS)
October 21, 2022, 1:51pm
7
@omer.ozturk
What kind if varible does it need to be?
in the folder are like 500 files. i don;t think it is smart to go trough all of them with a each file in folder. or does that not matter
@DukkyS ,
arrFiles need to be string array. Array[String]
This statement give you all folder paths earlier than 30 days. Click the Array of T, then click String.
Regards
Ömer