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.
Post here if you experience file transfer problems or unexpected errors.
I am having issues uploading subdirectories to the remote server. Here is the scenario:

I have 2 directories dir1 and dir2 in my local test-files directory. Each of the dir1, and dir2 has files in the directory. I need to upload the files from dir1 and dir2 including the directories to the remote server under a directory - say testing.
FTP Script
  1. CHDIR($remote_directory) - where $remote_directory is defined
  2. LOCALCHDIR("C:\ftpfiles\test-files") #Under this I have dir1 and dir2 etc.
Does anyone know how to upload the directories and files from dir1/dir2 to the remote site. The same structure has to be formed under testing on the remote directory (/testing/dir1, /testing/dir2).

I have tried to getlist and other methods to PUTFILE but I can only upload the directories to the remote site? I can't seem to get the dir1 and its files uploaded to the remote site.

Any ideas on how this may work?

Regards,
Irfan
How do I find an FTP host that allows me to upload via FTP and allows others to download via http or ftp? Would like to use an FTP client to upload with. Others would be able to download the files by going to an http site and using their web browser, or if they prefer, using an FTP client. What hosting service offers this as an easy setup?
Last edited by akeyalee on 25 May 2011, 07:49, edited 1 time in total.
to iqazi
FTP Script
  1. SYNC("C:\ftpfiles\test-files", $remote_directory, UPLOAD_DELETE,SUBDIRS)