Copying a file nested in a hidden folder

I’m having trouble copying files that are nested in a hidden folder. The file paths may look like this:

user/visibleFolder/.hiddenFolder/visibleFolder/visibleFolder/sourceFileToCopy

The file I want to copy is sourceFileToCopy and I have it’s URLPath. SourceFileToCopy can be any number of directories deep inside the .hiddenFolder parent. When I use the FolderItem.CopyFileTo method to copy a file, everything runs as expected but no file is copied and no error is thrown.

Any suggestions?

Did you tried the same code but to a visible path ?
(user/visibleFolder/VisibleFolder/visibleFolder/visibleFolder/sourceFileToCopy)

If that works, fire a bug with Feedback.

There’s nothing special about a . (dot) folder other than the shell and Finder are programmed to hide them from default view.

Have you tried using .NativePath instead of a URLPath?

@Emile Schwarz

[quote]Did you tried the same code but to a visible path ?
(user/visibleFolder/VisibleFolder/visibleFolder/visibleFolder/sourceFileToCopy)

If that works, fire a bug with Feedback.[/quote]

Yes, the code works fine on files that are not nested in a hidden folder. In fact, the function is written to handle either scenario, nested in hidden or unhidden folders. It’s just the ones n hidden folders I can’t copy. Their folder items show exists, isreadable, visible all as True.

@Tim Jones

[quote]There’s nothing special about a . (dot) folder other than the shell and Finder are programmed to hide them from default view.

Have you tried using .NativePath instead of a URLPath?[/quote]

Thanks, Tim, I’ll give it a try.

And if it fails, fire Feedback