Go Back   Computer Forums > General Computing > Hardware
Click Here to Login
Join Computer forums Today


Reply
 
Thread Tools Search this Thread Display Modes
 
Old 02-25-2007, 04:52 PM   #1
Baseband Member
 
Join Date: Oct 2006
Posts: 36
Question Sync Files Via FTP Batch...?

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~
__________________

avgjoe22 is offline   Reply With Quote
Old 02-25-2007, 06:12 PM   #2
Baseband Member
 
Join Date: Oct 2006
Posts: 36
Default Re: Sync Files Via FTP Batch...?

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?
avgjoe22 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



All times are GMT -5. The time now is 02:03 AM.


Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0