All Posts Tagged With: "ftp"

Edit Files "Live" Via FTP With Notepad++ [How-To]

If you run your own web site and run Perl, PHP scripts or the like, there will be instances where you have to edit some files from time to time.

The long way to do it is to download the file you need to edit, modify it, then upload it back.

The short way is to edit the file "live" on the server directly. Using Notepad++ this is easy to do with it’s built-in FTP feature.

First, enable FTP folders by clicking the small yellow folder icon at top:

image

You will see a right and bottom pane appear, similar to this:

image

In the FTP Folder window at right, click the settings icon (the gray one that looks like a gear).

You’ll get a window like this:

image

Click New (bottom left button) to start a new profile.

Enter Profile as the friendly name you want to remember this FTP server by, such as "My FTP Server".

Enter Address as the FTP server you want to connect to, followed by your username and password.

If using Windows XP, you don’t have to set anything else up.

If using Vista or 7, you do have to set the Use profile cache directory to a local writable folder (such as My Documents for your local Windows account). If you don’t do this, you will not be able to edit any files "live".

When done, click OK.

To the left of the settings icon you clicked is a blue plug-looking icon:

image

Clicking this will bring up your server list. It will show the entry you just created. Click your entry and you will establish an FTP session with your server.

From there you can double-click any file you want (as long as it’s text based) to edit, seen below.

image

After double-clicking a file it will open in the editor as a tab (each successive file you open will create more tabs). Make your edits, then save the file with the save button or CTRL+S, and it will be saved direct-to-server.

Open / Save An OpenOffice Document Via FTP

If you have your own web site you most likely transfer files via FTP every so often. Wouldn’t it be cool if you could store your documents, spreadsheets or anything else OpenOffice can make there?

You can.

Note before continuing: I have only tried this with the Windows version of OpenOffice, but it’s assumed this will work on the Linux or Mac OS X version in exactly the same way.

Step 1.

Launch OpenOffice Writer and go to the Options panel. In Windows this is done by clicking Tools then Options.

Once there, expand OpenOffice and click General. Next to Open/Save Dialogs, check the option for Use OpenOffice.org dialogs.

Looks like this:

image

Click OK when finished.

Step 2.

Before using FTP it’s suggested you login via the FTP client of your choice and create a non-public directory. For simplicity’s sake I named mine docs. You can name yours that or any other name you wish. Create this folder at the FTP root (not to be confused with server root).

In plain English: If you login to your FTP server via a client, you’ll see a list of directories. Your docs directory should be at "first level" so you don’t have to type in a bunch of stuff just to get to where you need to go.

Step 3.

Type up a test document in Writer, then click File then Save As…

When the save window appears, you have to open up the FTP server first before saving. In the File Name field, you would type:

ftp://YOUR-FTP-USER-NAME@ftp.YOUR-WEB-SITE.com

If you created the folder docs, it would be:

ftp://YOUR-FTP-USER-NAME@ftp.YOUR-WEB-SITE.com/docs

After clicking Open you will be prompted for your FTP password. Enter it in and you’re good to go.

Additional notes

Is this secure?

No. This is plain text FTP authentication. But for most people this shouldn’t be a problem.

Are the transfers fast?

Yes. OpenOffice transfers files via FTP just like a normal client would.

Do I have to keep typing in my username/password over and over and/or switching directories to load/save?

No. OpenOffice will remember the last known directory you were in.

Can I make OpenOffice "forget" the FTP password?

Yes. Simply close all OpenOffice apps and the FTP password will be "forgotten". Bear in mind this includes the QuickStarter resident app as well (in Windows: Right-click the OpenOffice QuickStarter next to the clock, choose to exit).

Will this work for any OpenOffice application?

Yes. Whether your composing a document, spreadsheet, presentation or database, as long as the "Use OpenOffice.org dialogs" is checked in the General section of Options, all have ability to save and load via FTP.

Is there any drawback to saving via FTP?

Other than the plain text authentication stuff, there isn’t any file transfer progress meter like there is in an FTP client. For large files this may be a bit annoying not knowing when transfers will complete. My suggestion is to stay under the 1MB mark so loads and saves go thru quickly.

Can you have more than one user accessing a file at once via FTP?

Yes but the sessions will be separate. This is not like loading a file over a LAN. I strongly recommend against having multiple users accessing the same files over FTP. Do-able? Yes. Recommended? No.

I don’t have an FTP server but like the idea of saving my stuff to a remote server. Is there any other option?

Google Docs using the OpenOffice.org2GoogleDocs extension. That extension not only does Google Docs but also Zoho and WebDAV connectivity as well. This extension was last updated April 8 2009, so it’s very recent and actively developed.

Web Based FTP Client

Have you ever needed to quickly connect to an FTP site to either upload or download a file, but you don’t have an FTP client handy? If so, then net2ftp is site you will find helpful.

When you visit the site, the usage is obvious: you enter the server and login information and then you can do all your FTP’ing from within your browser. net2ftp does offer some rather interesting features:

  • There are 3 different ways to upload files: the standard upload form, the upload-and-unzip functionality, and the Java Applet.
  • Edit HTML a What-You-See-Is-What-You-Get (WYSIWYG) form; there are 2 different editors to choose from (FCKEditor and TinyMCE).
  • Edit HTML and PHP in an editor with syntax highlighting (CodePress).
  • Filter out files based on the filename, last modification time and filesize.

I would be wary of the fact that you do have to submit your full credentials in order to connect (0bviously) and once you do, you don’t know whether or not this information is stored. No need to be paranoid, but I would be careful about using this service for sensitive information.

Tags:

An Easy Way To Transfer Large Files To Yourself

I am constantly having to do work on client systems and many times this requires me to transfer large files to and from my computer and theirs. While FTP works great, many times there are firewall/IT restrictions which can make this more trouble than it is worth. Additionally, emailing files to myself usually has a limit on the file size.

The solution I have been working with for some time now is using my email drafts to transfer the files. Basically, I compose a message on one system and upload the files I need and then save the draft. I then open my email (web interface) on the other machine and download the files from my draft. Since I never send the email, the limitation doesn’t kick in. I have been able to successfully transfer over 200 MB of files in one swoop doing this.

I really have become fond of this method because it doesn’t require the client machine to have any software installed. I’m curious if anyone else has any other methods they can suggest.

Backing Up A KeePass Database To A Server

KeePass Password Safe is a free password manager utility program that I’ve written about before. One question that came about is "Okay, so you can save a password file locally. But how about backing it up to a server?"

KeePass does in fact have the ability to do this via FTP.

Using the latest version 2.06 beta, you open your database and click File then Save As then Save to URL, like this:

image

From there a new window opens and looks like this:

image

Your URL is entered as ftp://ftp.example.com/MyDatabase.kdbx or something similar to it. After that you enter your FTP username and password in the fields below, then next to "Remember" you can opt to have the application remember your user/pass, remember user/pass for this session only or not remember at all.

"But I don’t have an FTP server!"

Your ISP most likely offers you free homepage space which is accessible via FTP. You can use that to store your password database to. See your ISP’s "personal homepage" options for more information on that.

"How do I know my password database is secure if on a remote server?"

Place a strong master password on the database. You do this from within KeePass itself. Never place a password database on a remote server that doesn’t have some kind of strong authentication to access it.

"Can I retrieve my password database from a remote FTP server without having a local copy?"

Yes. Click File, then Open, then Open URL. Enter your FTP information there and you can download the password database direct from FTP without ever having to save it locally. And if you modify it, yes it will save to the FTP location as well.

Basic Windows FTP Command Line Scripting

Sometimes there is a need to login via FTP from the command line in Windows. Maybe you just need to login to make a quick upload or download.

This tutorial will show you how to make a quick login script that will login you into your FTP server without having to type it in.

To do this, we write two text files (one script, one batch) and place both of them in the C:\WINDOWS folder for "launch from anywhere" access since C:\WINDOWS is by default in the resident path.

Step 1: The FTP Scripting File

Open up Windows Notepad and enter the following 3 lines:

open [your ftp server address here]
[your ftp username]
[your ftp password]

Here’s another way of looking at it:

open ftp.example.com
myusername
mypassword

Save this file as C:\WINDOWS\goftp.txt

Step 2: The Batch File

Open up Windows Notepad again, create a new text file and enter the following two lines:

CD C:\WINDOWS
ftp -s:goftp.txt
exit

Step 3: Run the batch file

The files are already in the system path so you can directly launch this from the Run dialog box.

Click Start then Run, type goftp and click OK.

A command prompt window will appear and log you right in.

When you type exit to log off from the FTP server, the window will automatically close (that’s what the "exit" line is for in the batch file).

Quick question answered: Can’t all this be done in a single batch file?

Answer: No. When the batch file calls the FTP application it cannot execute commands within the FTP session. That’s why you need an additional text file to "carry in" commands with.

If your batch file looked like this:

CD C:\WINDOWS
ftp ftp.example.com
username
password

..this is wrong. The batch file will stop right after the "ftp ftp.example.com" line and will not input the username or password. And when you exit the FTP session you’ll get a command line error because your FTP username and password aren’t Windows executables.

One final note: This is obviously not secure whatsoever. If someone found the scripting file in your C:\WINDOWS directory, they’ve got your FTP username and password.

Only do scripting like this on a computer nobody else uses but you.

Three Free FTP Clients

If you’ve ever delved into the world of having your own web site, you will inevitably have a need to send and retrieve files from your server via FTP.

FTP is really (and I mean really) old and still widely used. While it’s true you can send or receive files from the command line in any OS, the GUI way of doing it is much easier because you get things like drag’n'drop, mass uploading or downloading with subdirectories with just a few clicks and so on.

Filezilla

Where to get it: http://filezilla-project.org/

Supported OSes: Windows, Mac OS X, Linux

Whether you’re using Windows, Mac OS X or Linux, Filezilla is a rock-solid reliable stable FTP client with many features and an easy-to-use interface. Most people if given the choice of which free FTP client to use would most likely opt to go with Filezilla first.

WinSCP

Where to get it: http://filezilla-project.org/

Supported OS: Windows

WinSCP has also proven itself to be stable and reliable. Its drawback is that it’s Windows-only but definitely gets the job done. If you’re a Windows user you may prefer this over Filezilla as the interface is a bit easier to understand.

Core FTP

Where to get it: http://www.coreftp.com/

Supported OS: Windows

Core FTP has many features with command line support, but its single largest drawback is that it looks terrible. In addition there is a small "nag" screen each time you start it. But it’s free so you really can’t complain.

Need more choices?

A list of many FTP clients (both free and paid) are available here.

Using Your Own FTP Server With Foxmarks

Foxmarks is a freely available add-on for the Mozilla Firefox web browser. Normally what you would do to send/retrieve your bookmarks is use the Foxmarks servers to store this information, however if you host your own web site (or just use free FTP space provided by your ISP) you can store your own bookmarks privately via FTP. See video below for details.