One Star

## Talend Job over network - CMD doesnt support UNC paths

I'm trying to run a remote job on a server. When I run the job inside TOS, it runs perfectly. However when I execute the job remotely, I get the following error:
'\\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
C:\Windows>\\
'\\' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows>cd \\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001\
'\\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001\'
CMD does not support UNC paths as current directories.
C:\Windows>java -Xms256M -Xmx1024M -cp ../lib/commons-lang-2.4.jar;../lib/dom4j-
1.6.1.jar;../lib/jakarta-oro-2.0.8.jar;../lib/talendcsv.jar;../lib/talend_file_e
nhanced_20070724.jar;../lib/systemRoutines.jar;../lib/userRoutines.jar;.;osc8129
001_0_1.jar; creditcentral.osc8129001_0_1.OSC8129001 --context=Default
Error: Could not find or load main class creditcentral.osc8129001_0_1.OSC8129001

I have a tFileList that has the following filepath:
(String)System.getProperty("user.dir")
Any recommendations/suggestions?
Moderator

## Re: Talend Job over network - CMD doesnt support UNC paths

Hi,
Please have a look at  jira issue https://jira.talendforge.org/browse/TDI-892
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

## Re: Talend Job over network - CMD doesnt support UNC paths

 Hi, Please have a look at  jira issue https://jira.talendforge.org/browse/TDI-892Best regardsSabrina

Thanks for the link xdshi. I found that link earlier when I was researching the problem but it didn't work for me. I'm attaching a screenshot that shows the unc path I used and it still didn't work.
Seventeen Stars

## Re: Talend Job over network - CMD doesnt support UNC paths

You can try to use the / (without double it) instead of \ because the JVM translate it automatically into the appropriated char. This way you avoid the hassle with the \ as escape char.
One Star

## Re: Talend Job over network - CMD doesnt support UNC paths

 You can try to use the / (without double it) instead of \ because the JVM translate it automatically into the appropriated char. This way you avoid the hassle with the \ as escape char.

That's interesting, I didn't know that. Unfortunately, I still have the same error message.

'\\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
C:\Windows>\\
'\\' is not recognized as an internal or external command,
operable program or batch file.
C:\Windows>cd \\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001\
'\\fs1\universe\Talend\Lenders\OSC\OSC8129001\OSC8129001\'
CMD does not support UNC paths as current directories.
C:\Windows>java -Xms256M -Xmx1024M -cp ../lib/commons-lang-2.4.jar;../lib/dom4j-
1.6.1.jar;../lib/jakarta-oro-2.0.8.jar;../lib/talendcsv.jar;../lib/talend_file_e
nhanced_20070724.jar;../lib/systemRoutines.jar;../lib/userRoutines.jar;.;osc8129
001_0_1.jar; creditcentral.osc8129001_0_1.OSC8129001_ --context=Default
Error: Could not find or load main class creditcentral.osc8129001_0_1
.OSC8129001
One Star

## Re: Talend Job over network - CMD doesnt support UNC paths

It seems that the error lies in the job_run.bat file that Talend generates for building jobs.
In the batch file the first two lines are:
%~d0
cd %~dp0
The error occurs when CMD tries to cd to the UNC path. When I edited the batch file to instead say "pushd %~dp0" instead of "cd %~dp0" it worked. Is there a more elegant solution or even an option in Talend that will let the jobs run on network drives, or will I have to edit every batch file I create from now on?
One Star

## Re: Talend Job over network - CMD doesnt support UNC paths

Is there any workarounds to get past manually editing every job_run.bat file manually and changing "cd" to "pushd"?
One Star

Any thoughts?
Seventeen Stars

## Re: Talend Job over network - CMD doesnt support UNC paths

Hi,
as file script is generated by Talend, I don't think so (there is a workaround).
Ask as a feature to bugtracker that Talend generate such a file that avoid that 'UNC constraint'.