WatchDirectory Forum
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl
watchDirectory forums >> Plugins >> Move after upload to UNC path
http://www.watchdirectory.net/cgi-bin/yabb25/YaBB.pl?num=1406247756

Message started by David Hostetter on Jul 25th, 2014 at 2:22am

Title: Move after upload to UNC path
Post by David Hostetter on Jul 25th, 2014 at 2:22am
Hi, the FTP Upload plugin's move after upload function does not seem to support UNC paths.  I could not find a {tag} that included the full UNC path and if I try to manually enter it, the double slash required ( \\server\share\subdir ) is changed to a single slash.

Since the monitored path is a UNC path and I actually do not  want to 'move' the file, just rename it in place, I tried to specify only the new filename hoping that with no path the monitored path would be used.  But that caused the renamed file to be placed in c:\windows\syswow64 :(

I also tried to use %WD_DIR%\newfilename since that ENV variable does contain the correct UNC path being monitored, but that just generated an error in the history.

Before I get crazy with like ^%WD_DIR^% or %%WD_DIR%% or worse  :o , I wonder if there is another way to rename a file, in place, after upload, when the monitored path is a UNC path?

Title: Re: Move after upload to UNC path
Post by Gert on Jul 25th, 2014 at 7:17am
Hello David,

I am not sure, I need to do some tests (probably during the weekend).

"... the double slash required ( \\server\share\subdir ) is changed to a single slash..."
odd....

Please note that the environment vars ( http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html ) you mention are NOT available to all tasks.

Title: Re: Move after upload to UNC path
Post by David Hostetter on Jul 25th, 2014 at 4:46pm
Ok, another false alarm.

Move to UNC works.  The issue was that for some reason on my system using the FQDN for the server failed, using just the bare server name worked:

\\server.domain.com\share\dir  - failed for me
\\server\share\dir - worked for me.

But this is certainly due to an issue we are having with cross-domain permissions as the machine running watchDirectory is in a different domain than the target server, not anything to do with watchDirectory.

The actual watchDirectory issue is that when you enter multiple backslashes in the Move To box, the caption below only displays one backslash.  However internally the double backslash is used, verified by looking at the detail in the history for that task.


Title: Re: Move after upload to UNC path
Post by Gert on Jul 25th, 2014 at 4:54pm
I will have a look at the "cosmetic" double/single slash issue.

As for permissions.... WD has an undocumented trick so a task can "mount" a share at startup using different user/pass credentials. Basically, something like
NET USE \\server\share\somedir /user:someone /pass:somesecretpass

Email me for more details.

WatchDirectory Forum » Powered by YaBB 2.5.2!
YaBB Forum Software © 2000-2017. All Rights Reserved.