I have been facing an issue at renaming and moving the files.
Scenario -
I have a folder named PDF which has only .pdf files
I want to replace “.pdf” with current date and after renaming, move all the files to a different folder which can be in a different drive or in a subfolder inside PDF folder.
I want to use for each loop and move file activity to get this done.
I have been facing challenges for the destination in move file activity. If I use newFileName inside destination, it replaces the file in the same folder but that’s not the objective. Is it possible to rename and move the files in different folder i.e. dstpath
I want to use newFileName variable in such a manner that filename is replaced by newFileName and newFileName also moves to dstpath. And it all should be done inside move file activity.
If you don’t want to change in the source then keep another move activity and in the destination folder itself you can give newFileName and give the Same Destination folder
I wanted to use move file activity just once inside for loop. As you would have seen that objective is to replace filename with newFileName and move newFileName to another folder i.e. dstpath which stores the path of the destination. I was wondering if there is a possibility to use newFileName and dstpath in .
If you could help, please do.
Thanks in advance
Hello Tarun,
In this video I do a lot of stuff with Files (Chapter included) :
1:10 Download the file and Move the latest file to folders
4:30 Rename files with VB commands
6:00 Move files to do Rename
6:55 Delete files
8:15 Delete only PNG files
8:55 Delete all the files except PNG files
9:55 Move files
11:10 Delete files that are older than 2 weeks
14:40 Create a file or folder with dates inside
17:00 Trigger a process when the file is added to a folder
18:45 How to use the files start the process
20:30 Excel Application Scope use files