Skip to main content
Question

FileCopy Fails writing filenames with > 256 characters?

  • November 25, 2019
  • 4 replies
  • 14 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

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+49
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+18
  • 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
erik_jan wrote:

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!


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings