cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi experts,

we are currently facing an issue with the file functions file_copy, file_move and file_delete with Data Services version 4.2 SP06 patch 2.

When we use a filename based on a mapped drive (like C:\temp\file.txt) everything works as expected.

But as soon as we use a file based on an UNC path (e.g. \\vmware-host\Shared Folders\C\temp\file1.txt) we receive the error that the input filename is invalid.

The strange thing:

Before we call the file_copy function we check if the file exists by using the function file_exists. And file_exists returns 1 which means that the file can be found even if we use the UNC path!?

For testing we used a job containing only the following simple script:

In the trace file we can see that file_exists finds the file:

But the error log shows that file_copy has a problem with the filename:

By the way: the Data Services service runs under a user account that has permission to the UNC path.

Are UNC paths not supported with the file_functions file_copy, file_move and file_delete?

Or did we make a mistake?

Thanks a lot for your support.

Best regards

Marcus

0 Likes
View Entire Topic
chethan_lingaraju
Active Participant
0 Likes

Hi Marcus,

Try with double quotes around the path. Space in the folder name "Shared Folders" could be causing problem.

--

Regards

Chethan

former_member187605
Active Contributor
0 Likes

Have you tested this? I don't think so.

It's not due to the space, you get exactly the same error without. And using double quotes makes DS think you're referring to a column name.

chethan_lingaraju
Active Participant
0 Likes

Hi Dirk,

Tested now. It did not work

Had to use exec, space troubled when its without quotes.

Used like this:

exec('cmd.exe','copy "\\\\W2k12r2-5earc9b\\c\\Test folder\\file.txt" "\\\\W2k12r2-5earc9b\\c\\Testfolder\\file.txt"',8);

--

Regards

Chethan