Hot Topic (More than 10 Replies) FTP command for Dummies (Read 1851 times)
jacker
Member
*
Offline



Posts: 42
Location: Milwaukee, WI
Joined: May 20th, 2008
FTP command for Dummies
Mar 22nd, 2011 at 3:57pm
Print Post Print Post  
I'm trying to use the FTP command to upload a file to my ftp server in what I thought was a very basic way...but I can't get it to work. My ftp server logs the successful login and upload, but no matter what file I "send", I open the resulting file and find all it contains is a line of text telling me the path and name of the sent file. The original data is nowhere to be found...

Ftp("ftp.myserver.net", "myftpuser", "myftppassword", "target.txt", "C:\testing123.txt")

"C:\testing123.txt" contains a paragraph of sample text.

On the ftp server I open the resulting file (target.txt) and it contains: C:\testing123.txt

...which is the name of the file I sent...but not what it contains.
  

Jack - I'm smokin' past the filter and it's burnin' my lips...
Back to top
YIM YIM  
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: FTP command for Dummies
Reply #1 - Mar 22nd, 2011 at 4:13pm
Print Post Print Post  
We're sorry, Jacker. There is an error in the printed documentation for this command. It has been corrected in the Errata and the List Browser (Ctrl-L from the Programming Editor). The last argument is the actual text to send, not the name of the file.

Try something like:

var vSource as String

vSource = @Insert("C:\testing123.txt")
Ftp("ftp.myserver.net", "myftpuser", "myftppassword", "target.txt", vSource)
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
jacker
Member
*
Offline



Posts: 42
Location: Milwaukee, WI
Joined: May 20th, 2008
Re: FTP command for Dummies
Reply #2 - Mar 22nd, 2011 at 4:28pm
Print Post Print Post  
Ok, thanks, I got that to work...

On to hurdle Number Two: How would I ftp something actually useful like a PDF or a Word doc since they are technically binary files?
  

Jack - I'm smokin' past the filter and it's burnin' my lips...
Back to top
YIM YIM  
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: FTP command for Dummies
Reply #3 - Mar 22nd, 2011 at 6:08pm
Print Post Print Post  
I use File I/O to write the ftp commands dynamically to a text file, which I then use with @Shell and ftp -n -s.

My commands file (ftpcon.txt) might look like this:
open mysite.com
user my_username my_password
cd www
bin
send myfile.pdf
bye


My batch file - which I would run with @Shell - would look like this:
ftp -n -s:ftpcon.txt
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
jacker
Member
*
Offline



Posts: 42
Location: Milwaukee, WI
Joined: May 20th, 2008
Re: FTP command for Dummies
Reply #4 - Mar 22nd, 2011 at 6:53pm
Print Post Print Post  
Cool, I think I can work with that. Thanks!

I will have to assume that the Windows ftp command will always be available and its syntax will not change across XP, Vista and 7.
  

Jack - I'm smokin' past the filter and it's burnin' my lips...
Back to top
YIM YIM  
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: FTP command for Dummies
Reply #5 - Mar 22nd, 2011 at 8:45pm
Print Post Print Post  
jacker wrote on Mar 22nd, 2011 at 6:53pm:
Cool, I think I can work with that. Thanks!

I will have to assume that the Windows ftp command will always be available and its syntax will not change across XP, Vista and 7.

FTP has been around for a looooong time, so hopefully Microsoft will not decide to "fix" it in any way.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
jacker
Member
*
Offline



Posts: 42
Location: Milwaukee, WI
Joined: May 20th, 2008
Re: FTP command for Dummies
Reply #6 - Mar 23rd, 2011 at 2:57pm
Print Post Print Post  
Perhaps I should have asked this question first...

The Scenario: My application is a candidate database for a job placement business. They have seven offices, two Sesame servers, and four different but almost identical Sesame applications. Some users connect to Sesame over the Internet, but the servers are dedicated to running Sesame and are NOT configured as web or ftp servers (and I don't want them to be, either).

My goal is to allow the user to upload and "attach" candidate resumes (Word or PDF) to a candidate record in the Sesame application. I assumed I would have to use a separate ftp server as a storage location for the resumes, hence my recent questions.

However, is there a communication method/protocol in the API for up- and downloading documents to the Sesame server *without* using FTP or HTTP? It would need to work over the Internet since some clients are remote (so Windows networking is not an option, unless I entertain a tunnel or something like that).

Perhaps the better method is to use Windows to expand the private network to include the remote users thereby bypassing the entire FTP method/problem, and use regular ol' File I/O instead?

This must be a fairly common problem...
  

Jack - I'm smokin' past the filter and it's burnin' my lips...
Back to top
YIM YIM  
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: FTP command for Dummies
Reply #7 - Mar 23rd, 2011 at 5:27pm
Print Post Print Post  
I'm not sure what to tell you, Jacker. FTP stands for File Transfer Protocol. HTTP stands for Hypertext Transfer Protocol. The operative words in both these terms is "transfer protocol".  These are how you transfer files when you don't have direct network access.

There may be some way to manage this via a Rube Goldberg arrangement of email and/or encoding and/or external utilities, but there is probably a lot less complexity and points-of-failure in simply turning on FTP.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
jacker
Member
*
Offline



Posts: 42
Location: Milwaukee, WI
Joined: May 20th, 2008
Re: FTP command for Dummies
Reply #8 - Mar 23rd, 2011 at 7:34pm
Print Post Print Post  
I understand the ramifications of ftp...I thought perhaps that since Sesame already opens the 2000x ports for communication that it had a method for transferring a file from a client to the server over that port.
  

Jack - I'm smokin' past the filter and it's burnin' my lips...
Back to top
YIM YIM  
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: FTP command for Dummies
Reply #9 - Mar 23rd, 2011 at 8:29pm
Print Post Print Post  
jacker wrote on Mar 23rd, 2011 at 2:57pm:
Perhaps I should have asked this question first...

The Scenario: My application is a candidate database for a job placement business. They have seven offices, two Sesame servers, and four different but almost identical Sesame applications. Some users connect to Sesame over the Internet, but the servers are dedicated to running Sesame and are NOT configured as web or ftp servers (and I don't want them to be, either).


Is there a particular reason not to run an FTP server? Is this a publicly available (on the internet) Windows box?

Quote:
My goal is to allow the user to upload and "attach" candidate resumes (Word or PDF) to a candidate record in the Sesame application. I assumed I would have to use a separate ftp server as a storage location for the resumes, hence my recent questions.


A separate bit of software, or a different computer?

Quote:
However, is there a communication method/protocol in the API for up- and downloading documents to the Sesame server *without* using FTP or HTTP? It would need to work over the Internet since some clients are remote (so Windows networking is not an option, unless I entertain a tunnel or something like that).

Perhaps the better method is to use Windows to expand the private network to include the remote users thereby bypassing the entire FTP method/problem, and use regular ol' File I/O instead?

This must be a fairly common problem...


Not a very common problem in that most people don't rule out using FTP or HTTP. Using Windows networking or even a Windows based server through an open internet connection is cumbersome and dangerous. Sharing files using Windows networking through a non-encrypted connection is likely to be very dangerous.

I would recommend running an FTP server on the same computer that is running the Sesame server. If that is impossible, you can encode the .doc and .pdf files using base64 encoding and embed them in a hidden linked element on the form. Then, on retrieval, provide a button that decodes them. You could also use the SBasic networking commands and a server side mass update to send the files.

Sesame3 has internal file transfer, but because server security is important, and we have had very little demand for it, it was never implemented in Sesame2.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
jacker
Member
*
Offline



Posts: 42
Location: Milwaukee, WI
Joined: May 20th, 2008
Re: FTP command for Dummies
Reply #10 - Mar 23rd, 2011 at 9:01pm
Print Post Print Post  
Quote:
Sesame3 has internal file transfer, but because server security is important, and we have had very little demand for it, it was never implemented in Sesame2.


Sesame3??
  

Jack - I'm smokin' past the filter and it's burnin' my lips...
Back to top
YIM YIM  
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: FTP command for Dummies
Reply #11 - Mar 23rd, 2011 at 9:37pm
Print Post Print Post  
jacker wrote on Mar 23rd, 2011 at 9:01pm:
Quote:
Sesame3 has internal file transfer, but because server security is important, and we have had very little demand for it, it was never implemented in Sesame2.


Sesame3??


Working on it as we speak. Here is a S2 application loaded in S3 - with thumbnailed form selection:

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: FTP command for Dummies
Reply #12 - Mar 23rd, 2011 at 9:44pm
Print Post Print Post  
When are we getting Sesame 3? Can we have a preview of some of the major changes and new features?
  
Back to top
 
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: FTP command for Dummies
Reply #13 - Mar 24th, 2011 at 12:10am
Print Post Print Post  
Looks great, Mark.

Please accept my vote for a client to server and client to client file transfer feature. Also, throw in an Instant Messaging chat feature while your at it!  Wink

Thanks!
Steve
  
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: FTP command for Dummies
Reply #14 - Mar 24th, 2011 at 1:11pm
Print Post Print Post  
Bharat_Naik wrote on Mar 23rd, 2011 at 9:44pm:
When are we getting Sesame 3? Can we have a preview of some of the major changes and new features?


I don't have a release schedule from Lantica. I'll see if I can post some more about features. Probably should start a new thread for such.

Steve_in_Texas wrote on Mar 24th, 2011 at 12:10am:
Looks great, Mark.

Please accept my vote for a client to server and client to client file transfer feature. Also, throw in an Instant Messaging chat feature while your at it!  Wink

Thanks!
Steve


No votes needed. File transfer is already in there. Text chat is a breeze in either S2 or S3. But S3 will likely be able to do both text chat and AV chat.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged