Sync Files Via FTP Batch...?

avgjoe22

Baseband Member
Messages
36
Hello, I have a flash drive that I am loaning to a friend. We're working on a project together, and I want the drive to automatically sync files between the flash drive and my computer at home.

It already has an auto run file, and it runs a batch file called "autosync.bat"

I want autosync.bat to take files on the flash drive in 3 different folders, and put them in corresponding folders on my ftp server.

So, for the sake of simplicity let's say that my username is "usr" and my password is "pword", my IP address is 0.0.0.0 and the port number is 21.

I want all files in folder "Websites" (G:\Websites) to sync to "\Websites" (C:\MyFTP\Websites) etc.

I already have my FTP service up and running, and although the drive letter will change, I think we can use "." and ".." for directory purposes in the batch file.

So, can anyone help me out?

~Thanks~
 
What I had before was:

autosync.bat:
Code:
cd Folder1

ftp
open 0.0.0.0
port 21
user usr
pass pword
cd Folder1
mput *.*
mget *.*
bye

cd ..\Folder2

ftp
open 0.0.0.0
port 21
user usr
pass pword
cd ..\Folder2
mput *.*
mget *.*
bye

cd ..\Folder3

ftp
open 0.0.0.0
port 21
user usr
pass pword
cd ..\Folder3
mput *.*
mget *.*
bye

But that doesn't work...

It just runs and gives me the prompt for ftp commands.

Can anyone help me?
 
Back
Top Bottom