Discuss , our SFTP/FTP/FTPS/SCP server for Windows. Secure, fast and customizable!

sub folders

no avatar
User

gdurbx

Posts

3

Joined

Fri Jul 11, 2014 2:55 am

sub folders

by gdurbx » Sat Jul 12, 2014 12:37 am

We are evaluating CompleteFTP Pro and it seems to do all that we need it to do (so far) ...
Here's what I need, but I can't seem to get it to work using an FTP Script:
On a CompleteFTP Pro external server, a user with sub folders in their home folder --
Home
--User
----Sub1
----Sub2
----Sub3
----Sub4

On an internal server, on a shared network volume with FTP access from CompleteFTP --
Root
--User
----Sub1
----Sub2
----Sub3
----Sub4

I can't get items put into one of the user sub folders to copy into the corresponding sub folder on the internal server. I can get the files copied to multiple sub folders, but not to just the desired sub folder. Folder names are the same on both servers (obviously the paths aren't the same).
How do I get files copied to the correct single sub folder from CompleteFTP?
Is there a way to use a single FTP script that handles all sub folders for each user -- or do I need separate FTP scripts for each sub folder for each user?
Thanks!
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: sub folders

by support2 » Sat Jul 12, 2014 12:48 am

What script are you using and how is it initiated?
no avatar
User

gdurbx

Posts

3

Joined

Fri Jul 11, 2014 2:55 am

Re: sub folders

by gdurbx » Sat Jul 12, 2014 1:17 am

# Sample FTP script for uploading a file to another server
#
protocol=ftp
remotehost=192.168.0.000
user=user
password=pswd
# connect to the server
open
# change to sub folder
cd User
# upload the file for which the trigger occurred to the server
put "%WindowsPath%" "Sub1\%FileName%"
# disconnect
close

Initiated on "Upload" -- "Trigger on success"
With the path hard-wired for the "put" command (above), separate scripts are needed for each sub folder for each user, but that results in multiple copies of the file on the internal server.
no avatar
User

EDT Support

Posts

905

Joined

Mon Apr 26, 2004 3:03 pm

Re: sub folders

by EDT Support » Thu Jul 17, 2014 3:08 pm

I'm sorry we missed your reply. I hope you haven't given up in the meantime. As a trial user you're entitled to e-mail-based support for the duration of your trial. E-mail responses are prioritized ahead of forum posts. You can e-mail us at support@enterprisedt.com

Anyway, I noticed that your put statement uses a backslash rather than a forward slash. That might be the cause of your problem.

- Hans (EnterpriseDT)
no avatar
User

support2

Posts

3987

Joined

Tue May 18, 2004 8:30 am

Re: sub folders

by support2 » Fri Jul 18, 2014 4:31 pm

OK, I see the problem. I have to admit it's pretty confusing. Our FTP scripting feature is actually executed using an external executable called edtftp.exe, which you'll find in C:\Program Files (x86)\Complete FTP\Server. This means that it "lives" in the Windows file-system rather than the CompleteFTP virtual file-system. In other words, when you're telling it the path of a local file you need to use its Windows path rather than its CompleteFTP path.

This means that you need to do the following:

# change folders
cd "%VirtualPath%"

# upload the file for which the trigger occurred to the server
put "%WindowsPath%" "%FileName%"


The 'cd' refers to the remote server's file system. I understood that it has the same directory structure as the local CompleteFTP server, so I used the local server's virtual path. In the 'put' I referenced the local file using its Windows path for the reason explained above.

I hope that makes sense.

FYI we are actually planning to offer a much more powerful Javascript-based scripting option some time later this year, which will eliminate these problems, as well as offering a far more flexible syntax.

Who is online

Users browsing this forum: No registered users and 4 guests

Powered by phpBB ® | phpBB3 Style by KomiDesign
cron