Hi all,
I have files which I would like to move, but some files have more characters then 260. In this case I get the following error
Is there anything I can do about it?
Thank you & BR
Markus
Hi all,
I have files which I would like to move, but some files have more characters then 260. In this case I get the following error
Is there anything I can do about it?
Thank you & BR
Markus
Hi @Markus3003
Try out this syntax
first find the length of thr string
If length >260
Rename the particular file
Then move the particular file
Thanks
Robin
I believe you have only 2 options to go for:
Change folder structure. For e.g. from C:\Long path\Really long path\Really really long path\OutputFile.xlsx
to C:\Long Path\OutputFile.xlsx
Map a new drive with most common path e.g. Z drive having path of C:\Long path\Really long path
so that file path would be Z:\Really really long path\OutputFile.xlsx
You can save it UiPath project folder and then move it to trg folder**
** you can not use the path beyond the limitation of win
Thank you guys,
but the problem is not the length of the path its the length of the file name (pdf).
in this case you can opt for 2nd method i.e. mapping new drive with maximum common path possible
@Markus3003 there is a solution for this when it is a path not to worry. I am unsure when it is a file name itself which is long.
We can wait for @otico s answer. I can’t remember the solution clearly, can you share it here?
Hi @Markus3003,
Have you tried the following solutions?
Alternative 1: Enable (set to 1) LongPathsEnable in Register editor.
Follow the instructions from this link: How to change the default 256 character path limitation (MAX_PATH) in Windows 10 | AutoCAD | Autodesk Knowledge Network
Alternative 2: Using SUBST
As @AkshaySandhu mentioned above you can mapped to a shorter path. Like for instance using powershell activty with SUBST command.
Example on how to use SUBST:
Like for example if the original long path is something like this: C:\Very Long Folder Path\Filename.pdf
SUBST W: C:\Very Long Folder Path
Now to move the file using Move File activity, and then you can set the input path to W:\Filename.pdf
To disable the SUBST command you can run SUBST W: /D
You can find the instruction on how to use the SUBST command from this link: DOS Command: SUBST
-John Michael
Hi @otico,
first of all thank you for your answer.
I tried Alternative 1: I did it like described, also rebooted the computer.
But I still get the same error in UiPath.
With Alternative 2 i do not really know how it works
I found at least the “invoke powershell activity” but I dont really know what to put there.
Thank you anyway.
Best Markus
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.