Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


jsmith@certipay.com
2012-11-29T16:31:58Z
I found a post or two similar to this, but there were no replies.

I'm attempting to set the destination on an FTP task. I'm not sure how to correctly set the path so that it matches our current implementation.

Currently, we just connect to the FTP site, change to the <serverName> directory, then drop the files. To mimic this, I set the FTP task to connect to the FTP site, and the destination is set as {COMPUTER(NAME)}. However, when I attempt this, the task fails with:

Exception in Task: Unaccepted server reply (error code is 550)
Error changing to FTP folder: Unaccepted server reply (error code is 550) (550 /z:/Backup/Dellserver2/d/backup/DELLSERVER2/d/backup: No such file or directory.
)

The home directory of the FTP site is z:\Backup\ and the source directory (where VC is running) is d:\backup but I'm not sure why/how it's coming up with the above path.

Can someone shed some light on this? I'm just trying to push files to FTPSITE/<ServerName>/
Sponsor
Forum information
bbusse
2012-11-29T20:00:55Z
Originally Posted by: jsmith@certipay.com 

The home directory of the FTP site is z:\Backup\ and the source directory (where VC is running) is d:\backup but I'm not sure why/how it's coming up with the above path.

Can someone shed some light on this? I'm just trying to push files to FTPSITE/<ServerName>/



What is drive Z? Is that local to the server running VC, or is it a mapped drive to another server? Or a mapped drive to itself?

Can you take some screenshots of your FTP task and how its configured and attach them to your reply. That might help.

Brian
jsmith@certipay.com
2012-11-29T20:26:45Z
'Z\Backup' is the root share the FTP server is serving up (that path only exists on the non-VC/FTP server). It might be mapped, I'm not sure, but it shouldn't matter...it's on the other side of the FTP.

I've attached a screen of the different configuration views.
File Attachment(s):
ftp.GIF (279kb) downloaded 103 time(s).
bbusse
2012-11-29T20:44:49Z
Originally Posted by: jsmith@certipay.com 

'Z\Backup' is the root share the FTP server is serving up (that path only exists on the non-VC/FTP server). It might be mapped, I'm not sure, but it shouldn't matter...it's on the other side of the FTP.

I've attached a screen of the different configuration views.



Without even trying it, I know you're going to need a preceeding / before your {COMPUTER(NAME)} variable for the destination.

If you try connecting to the FTP server using another FTP program (even the command line ftp built into some versions of windows) as the id/password you're using, when you're logged in, what directory do you get logged into? Does your FTP server mask the home directory as '/' or does it look like /username

You can tell by typing 'pwd' without the quotes. The reason I ask is... on our FTP server, when you log in, you're logged into /Username

So, for my destination, if I were to use your example, it would be:
/username/{COMPUTER(NAME)}

However, on yours, I bet your destination just needs to be /{COMPUTER(NAME)}

Brian
bbusse
2012-11-29T21:04:00Z
Also, Can you open your variables window in VC and show me what the {USERVAR(BackupDir)} is actually translated into?

Brian
jsmith@certipay.com
2012-11-29T21:18:17Z
jsmith@certipay.com
2012-11-29T21:19:35Z
It seems it's assembling the pieces in the wrong order and attaching source directory path.
bbusse
2012-11-29T21:26:28Z
Originally Posted by: jsmith@certipay.com 

It seems it's assembling the pieces in the wrong order and attaching source directory path.



I was able to reproduce this. Its happening when using a Variable for the Source Folder, and you're still adding the \ to the end.

You have this:
{USERVAR(BackupDir)}\

change your Source Directory to JUST this:

{USERVAR(BackupDir)}


EDIT: Actually, if your variable equals a folder that contains the trailing \ it'll break too.

So, If your path on your variable = C:\Temp you'll be fine to use {USERVAR(BackupDir)}
If your variable = C:\Temp\ No matter what you do, its not going to work. Source path apparently can't contain a \ at the end. This ONLY appears to be when a variable is involved. If I just TYPE C:\Temp\ it has no issues.


Brian
jsmith@certipay.com
2012-11-29T21:56:02Z
We're getting closer.

The paths aren't mangled, but the path is still incorrect

The ftp log shows that it's attempting to set the destination folder twice:

CWD DELLSERVER2\
250 Directory changed to /z:/Backup/Dellserver2

PWD
257 "/z:/Backup/Dellserver2" is current directory.

PWD
257 "/z:/Backup/Dellserver2" is current directory.

PWD
257 "/z:/Backup/Dellserver2" is current directory.

CWD DELLSERVER2/
550 /z:/Backup/Dellserver2/DELLSERVER2: No such file or directory.
bbusse
2012-11-29T22:09:17Z
Originally Posted by: jsmith@certipay.com 

We're getting closer.

The paths aren't mangled, but the path is still incorrect

The ftp log shows that it's attempting to set the destination folder twice:

CWD DELLSERVER2\
250 Directory changed to /z:/Backup/Dellserver2

PWD
257 "/z:/Backup/Dellserver2" is current directory.

PWD
257 "/z:/Backup/Dellserver2" is current directory.

PWD
257 "/z:/Backup/Dellserver2" is current directory.

CWD DELLSERVER2/
550 /z:/Backup/Dellserver2/DELLSERVER2: No such file or directory.





Did you add the leading / to your destination? I ended up 2 folders deep when I didn't. Not sure if thats normal behavior or not, but When I used

/{COMPUTER(Name)}

...I had no problems.

Brian



jsmith@certipay.com
2012-11-29T22:15:54Z
Adding the '/' in front of the Destination folder makes it relative to the root:


PWD
257 "/z:/Backup" is current directory.

CWD /DELLSERVER2/
550 /z:/DELLSERVER2: Permission denied.

CWD \DELLSERVER2
550 /z:/DELLSERVER2: Permission denied.

CWD \DELLSERVER2
550 /z:/DELLSERVER2: Permission denied.
bbusse
2012-11-29T22:19:33Z
So you have the same requirement I do.

I have to use /username/{COMPUTER(Name)}


So, if when you log in your default working directory is Z:\Backup\ that means you'd have to put this, because you always have to put the path STARTING with a forward slash. In your case, you're not masking the home directory as root, so you need to specify the folder in your source:

/Backup/{COMPUTER(Name)}

Brian
jsmith@certipay.com
2012-11-29T22:24:28Z
Winner!

Moral of the story...

- Don't end the source location Folder path in a '\'
- Specify the full destination path relative to the root share

Thanks BB
bbusse
2012-11-29T22:27:54Z
Originally Posted by: jsmith@certipay.com 

Thanks BB




Very welcome. Happy to help becuase its good to work through stuff like this for my own knowledge. I'll be doing something very similar REAL soon 🙂 Replacing some old psftp scripts that were execute tasks from way back in early VisualCron 4 on our old server and I want to use built-in functionality. I use this forum for learning, and sometimes for asking questions :)

Glad I could help/learn :)

Brian
Scroll to Top