I am currently automating a process that involves moving files from a folder in a Sharepoint mapped network drive (drive Z:) to another folder in the same drive. However when I try to use the “Move File” activity, I get the following error:
Is there a different activity I have to use to move files in a mapped network drive?
@lfcosta Even with the file name in the destination, I get the same error
I also have to use the mapped network drive because this is linked to my sharepoint folder, which is what I have to automate
@Hisuhong , does the file already exists in the destination folder? Can you try without the overwrite?
A way to bypass the need for the overwrite would be to use the activity path exists, where if the filename is already present you use the delete activity to delete the file before moving.
I’ve tried on my machine with a local folder w/ sucess
@lfcosta Ah in the mapped network drive case, I am moving a file in a folder in my mapped network drive, drive Z, to another folder in drive Z. I believe you moved it from a mapped network drive to your local drive. I have to keep everything in drive Z
@Nikola_Drazic unfortunately I am still getting the same error
Hmmm, let’s try with powershell.
Please use invoke powershell activity and type this: “Copy-Item “C:\Wabash\Logfiles\mar1604.log.txt” -Destination “C:\Presentation”” please check isSript in properties and give it a go.
First path is file path and destination is folder path.
I tried "Move-Item " + Thing + " -Destination " + Thing2 because I wanted to move the item instead of copying. This time I changed the value of the variable Thing to “Z:\Customer\New_Forms\Cust3_CAD_Customer Form.xlsm”. However when running the powershell, it gave me this error
Note: I also tried Copy-Item and it gave me the above error as well
Hi @Hisuhong,
it’s working on my machine. I made same folder structure and folder/file names are the same, only drive letter is different.
Did you tried this sample locally on your machine as well?
@Nikola_Drazic@lfcosta for both, I keep getting the same error “The filename, directory name, or volume label syntax is incorrect.” with both the Move File activity and powershell…Which is strange because it works for the both of you… I even tried it with the full path but that still gives me an error
@Hisuhong, you got the same error w/ the workflow i uploaded? If you are trying the workflow i shared can you share a print of the configuration and error?
hmmm… Make sure you have the proper path.Can you ping the directory via \\"Org Server"\"Parent Folder\Parent Folder\Test\New_Forms\Sample.xlsm\ outside of UiPath?