Hi there,
I want to change many files in the folder only the extension
For example
111.accdb
112.accdb
to be
111.mdb
112.mdb
how to do this? Thanks for your help
Hi there,
I want to change many files in the folder only the extension
For example
111.accdb
112.accdb
to be
111.mdb
112.mdb
how to do this? Thanks for your help
Hi,
@delf You can do that by using Movefile activity. Both From path and Destination path would vary only in extension. Attached the XAML for your referenceMain.xaml (9.2 KB)
PFA sample workflow with more dynamic options.
Just change the input directory name, File ext… It will replace all files within directly with new extension
You can restrict the file based on the ext as well just change file ext in “.”
Directory.GetFiles(“C:\Temp Folder\New folder”, “.”)
FileNameRename.xaml (7.6 KB)
Hi @rajeev85
Thanks for the reply. It works too but for my case is more suitable using example from @pawanbag
Thanks a lot
Cheers
Delf
Hi all,
I want to ask something…
Im encountering an error after i moved to my xaml file for my workflow
Source: Move file
Message: Cannot create a file when that file already exists.
Exception Type: IOException
System.IO.IOException: Cannot create a file when that file already exists.
My workflow is like this
Files_bup path is like this Directory.GetFiles(“D:\LogisticRobot\BUP_DB”, “.accdb”)
is there any wrong with my workflow?
Thanks for your help
Cheers
Delf
Hi @delf,
Directory.GetFiles("D:\LogisticRobot\BUP_DB", "*.accdb")
use * before dot so it will accept any file name contains .accdb files.
Regards,
Arivu
Hi @arivu96
Already used this
Directory.GetFiles(“D:\LogisticRobot\BUP_DB”, “*.accdb”)
but still get the error.
Thanks
Hi @delf,
This Exception is related to Move File Activity.
If you are moving file to one location to another location make sure the same file should not exists.
Regards,
Arivu
Hi @arivu96
im using @pawanbg sample workflow to just rename the data from .accdb to .mdb
and got that error.
Thanks
Regards
Delf
Hi Delf,
Give me some time, working on something urgent, I will look into this issue,
Thanks
Hi Delf
Thanks, I am happy that solution work for you
Hi @delf,
i am not sure you can directly change one data type to another data type using Move File activity.
What error are you getting?
Regards,
Arivu
Hi Delf,
I am able to recreate scenario you have described, Actually this is failing as file name after rename is already exists. in order to resolve this issue there are two options
PFA revised workflow, Hope this works for you