program to copy files to ftp backup server

sdlangers

Centurion
Joined
Dec 3, 2002
hi,

my dedicated server has a backup server which i can copy files to using these steps:

i have to open up IE and type in this url:

ftp://myuser@mybackupserver.com/

it then prompts me for the password which i enter, then i can simply drag the files into that window and it copies them over

however, i would like to write a .net program to copy some files over automatically and then schedule it to run nightly

can someone point me in the right direction for trying to code the above procedure. how do you specify the ftp site as the destination, how do you specify the user/pass etc.

thanks!
 

Nate Bross

Contributor
Joined
Apr 6, 2005
Location
Chicago, IL
I don't suppose the servers are on the same LAN and you could map a network drive. And you just use FTP for convenience? If so, you could write a batch file and schedule a task. Like this

Code:
@echo off
copy "C:\MyFile.ext" "D:\ACopyofMyFile.ext"
copy "C:\My2ndFile.ext" "D:\ACopyofMy2ndFile.ext"


Otherwise check out the links ilya2 posted at the end of this thread http://www.xtremedotnettalk.com/showthread.php?t=92744 you should be able to pick up some 411 there.
 

sdlangers

Centurion
Joined
Dec 3, 2002
Nate Bross said:
I don't suppose the servers are on the same LAN and you could map a network drive. And you just use FTP for convenience? If so, you could write a batch file and schedule a task. Like this

Code:
@echo off
copy "C:\MyFile.ext" "D:\ACopyofMyFile.ext"
copy "C:\My2ndFile.ext" "D:\ACopyofMy2ndFile.ext"


Otherwise check out the links ilya2 posted at the end of this thread http://www.xtremedotnettalk.com/showthread.php?t=92744 you should be able to pick up some 411 there.

Hi, thanks for the reply..

i wish it was that simple :)

the ftp drive cannot be mapped as a network drive, so i cant just use a drive letter.

i also tried that link you sent - the FTPClient in C# is a great program, but i cant get it to work for me.. problem is they use this line of code to connect:

aCN.Open("192.168.4.67", "anonymous", "", FTPMode.Active);

but i have to use the following syntax via a web-browser to connect:

"ftp://username@backupserver.com"

then it prompts me for the password, which i type in, and then i can connect

this is the ONLY way i can connect - i cannot even connect from regular FTP software. it HAS to be from within the browser on my dedicated server.. i cant even connect this way from any other computer.

anybody got any ideas on how to code this?
 

sdlangers

Centurion
Joined
Dec 3, 2002
oh.. nevermind - i got that FTPClient C# dll working

i just needed to use the IP address instead of the FTP://username@server.com syntax

so i did a ping to the server, from my dedicated server to get the ip, then switched the code to use that and it worked

thanks for the help

ps - if anyone else is looking for something similar - i definitely recommend the FTPClient DLL - great program:

http://sourceforge.net/projects/dotnetftpclient/
 

eakinasila

Newcomer
Joined
Nov 22, 2009
How to restrict a unix ftp user to its home directory? I want to restrict one ftp user so that it cannot access any other directory on the server other than the home directory assigned to it. It should have full access to its home directory and all its sub-directories. Any help is greatly appreciated.
 

booriaxy73

Newcomer
Joined
Aug 31, 2009
Location
United States
Hi Im trying to transfer all my pictures from my PC to PS3 using Red Kawa.

The problem is that i can only copy one file at the time. Is it possible to copy all files in a folder?
 
Top Bottom