ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Need help writing a script? Have any question about ScriptFTP?
I am using Script_FTP to copy files from a hosting company to our local server. I don't know how it knows what drive to get the file from since only a partial path is supplied. I don't see any shared folders but somewhere there must be a shortcut or something.

Here's the little script that runs. The location of the FULL folder is not specified, although the actual path at the source server is C:\DbDownload\FULL\weekly.rar
I don't see how it knows where the GETFILE "full\weekly.rar" is located. No drive letter or root folder specified.
FTP Script
  1. LOGTO($log_file_name)
  2. LOCALCHDIR("C:\baks\full")
  3.  
  4.  
  5. OPENHOST("111.222.333.444", "AdminLogin","AdminPassWord")
  6.  
  7. $getfile_result = GETFILE("FULL\weekly.rar")
So, If I want to pull a file from the remote server D:\folder1\folder2\folder3\MyFile.txt

How do I code for that ?

Thanks for any help.
It is optional. If it is not specified ScriptFTP will use the current remote or local directories. For example:
FTP Script
  1. GETFILE("thedir\thesubdir\2.jpg")
If current remote directory is \test and current local directory is C:\downloads ScriptFTP will download \test\thedir\thesubdir\2.jpg to C:\download

These commands will do the same:
FTP Script
  1. LOCALCHDIR("C:\downloads")
  2. GETFILE("\subdir\thedir\thesubdir\2.jpg")
Note that you can change current local and remote directories with LOCALCHDIR and CHDIR
The customer has followed up the conversation by email. I post here his response:
But I still don’t see where the root folder or drive letter is specified for the remote location.

If I want to pull a file from the remote server D:\folder1\folder2\folder3\MyFile.txt

How do I code for that ?
FTP servers do not use drive letters. The paths are always relative to "/" which is the FTP root folder. Then on the FTP server configuration this "/" is set to a specific directory that can be, for example, D:\my_ftp_server_root

So if you need to download, for instance, D:\my_ftp_server_root\folder1\a.txt:
FTP Script
  1. GETFILE("/folder1/a.txt")
or
FTP Script
  1. CHDIR("/folder1")
  2. GETFILE("a.txt")
How does it know that the file is on “D” drive and not on “E” drive ?
Where is the root folder defined ?
This cannot be defined from the client side (ScriptFTP). If you have access to your FTP server settings you will see that the FTP root folder (/) corresponds to a given folder path (D:\folder1, for example)
I have full admin access to the source & target servers, but have not found where the settings are.
What FTP server software are you using? IIS, Filezilla Server...
Windows server, I think IIS.
In this case you need to follow this instructions (this is for IIS 6 but may be applied for newer versions):

http://msdn.microsoft.com/en-us/library ... .100).aspx

You need to scroll down to "To configure an FTP folder and virtual root"