Hi everyone,
can anyone please let me know how to achieve this?
1- Search for a specific subfolder (called "Outputs") within a drive that contains hundreds of folders
2- Get the last modified subfolder within "Outputs" folder
3- Get the date modified of the all the pdf files under "Outputs" folder and then copy them into a new folders (called "Uncontrolled")
4- Rename the files with following format: filename-datemodified
5- delete the files from the last modified folder
Here's is more details:
K: drive
------ folder1
------ folder2
------ folder3
-----subfolder1
-----subfolder2
**-----Outputs**
------ **Uncontrolled**
-----03-04-2017
-----04-04-2017
-----05-04-2017** ( most recent folder)
----- A001-[3]-abcdefghij-03042017.pdf
----- A002-[3]-abcdefghijklm-03042017.pdf
----- A001-[3]-abcdefghijklmno-03042017.pdf
----- A001-[3]-abcdefghijgttry-04042017.pdf** (most recent pdf file)
Copy that into Uncontrolled folder
Change the value under []
delete the files from the most recent folder
HOW IT WILL LOOK LIKE AFTER :
------ Uncontrolled (folder)
----- A001-**[4]**-abcdefghijgttry-04042017.pdf (pdf has been copied and renamed)
Can someone please explain how to achieve this?