Skip to main content
Question

FileCopy Fails writing filenames with > 256 characters?

  • November 25, 2019
  • 4 replies
  • 29 views

Hello,

I am trying to migrate PDFs with the FileCopy writer. I have destination path and file names with lengths from 260 - 300+. They fail, but if I change the path to be shorter they all succeed.

Am I mistaken in thinking that FileCopy limited to 256 as its max pathname character count? Is there a way around this? Has anyone else run into this issue?

Additional info:

FME(R) 2019.0.0.0 (20190328 - Build 19238 - WIN64)

Windows 10

 

Thank you for your advice,

Andy

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

david_r
Celebrity
  • November 25, 2019

It's a limitation in Windows, most likely.

See https://stackoverflow.com/a/265782


redgeographics
Celebrity
Forum|alt.badge.img+62
It may be a Windows limit actually, Windows 10 had a 260-character path limit up until a few years ago, it can be removed but that requires action.

erik_jan
Contributor
Forum|alt.badge.img+26
  • Contributor
  • November 25, 2019

Assuming it is only a Windows limitation, would you be able to create a share for the folder?

In that case you can use the share as the base folder, using UNC path names, like:

\\\\<server>\\<share>\\<file name>

Hope this helps as a work around.


  • Author
  • November 25, 2019

Assuming it is only a Windows limitation, would you be able to create a share for the folder?

In that case you can use the share as the base folder, using UNC path names, like:

\\\\<server>\\<share>\\<file name>

Hope this helps as a work around.

Thank you! I ended up being able to map the first 76 characters to Network Drive X:/. This brought my longest pathname down to 232 characters, allowing me to write everything in their proper destination folders. Thanks again for everyone's input!