FTP within TextPad TO MULTIPLE DIRECTORIES ON SERVER

Instructional HowTos, posted by users. No questions here please.

Moderators: AmigoJack, helios, bbadmin, Bob Hansen, MudGuard

Post Reply
wnent
Posts: 12
Joined: Mon Aug 15, 2005 9:34 pm
Location: Fort Collins, CO
Contact:

FTP within TextPad TO MULTIPLE DIRECTORIES ON SERVER

Post by wnent »

TLMFTP - TextPad Local Mirror FTP - Release 1.0 - FTP add-on for TextPad 4

DESCRIPTION:
This program is intended for use with TextPad 4 by users that mirror on their local system text files that reside on a web or ftp server (such as a developer coding web pages). Once installed, users can quickly and easily upload the file they're currently editing locally to their ftp server from within TextPad TO THE CORRECT DIRECTORY. There are other TextPad add-ons that will FTP files to a specified server, but they all seem to have the same limitation - you have to configure a separate instance of the program for each directory to which you want to upload. TLMFTP fixes that by figuring out what directory the file should be uploaded to based on the local directory the file is in.


THE PROBLEM:
When developing web pages on a remote server, users have to:
1. Save changes to a local file in TextPad
2. Switch to an FTP program
3. Upload the file to the server
4. Switch to a browser
5. Refresh the page to view changes

THE SOLUTION - How TLMFTP works:
1. Use a keyboard shortcut to both save the file and FTP it to the correct directory on the server
2. Switch to a browser
3. Refresh the page to view changes


EXAMPLE:
On their local system, a user keeps a mirror of everything on their web server in the following directory:
C:\development\public_html

While editing the site, they make changes to the local files and then FTP the files to their web server:
http://www.example.com

Assuming the site has the following directory structure and files:
http://www.example.com/file_1.php
http://www.example.com/file_2.php
http://www.example.com/directory_1/
http://www.example.com/directory_1/file_3.php
http://www.example.com/directory_1/file_4.php
http://www.example.com/directory_2/
http://www.example.com/directory_2/file_5.php
http://www.example.com/directory_2/file_6.php

The local mirror would have the following structure and files:
C:\development\public_html\file_1.php
C:\development\public_html\file_2.php
C:\development\public_html\directory_1\
C:\development\public_html\directory_1\file_3.php
C:\development\public_html\directory_1\file_4.php
C:\development\public_html\directory_2\
C:\development\public_html\directory_2\file_5.php
C:\development\public_html\directory_2\file_6.php

By setting the variables in the tlmftp.vbs file located in the same directory as this readme file, the program will upload the current working file in TextPad to the corresponding directory on the specified server. If on the local system the user was editing "C:\development\public_html\directory_2\file_5.php", the file "file_5.php" would be uploaded to http://www.example.com/directory_2/file_5.php. "file_4.php" would be uploaded to "directory_1", "file_1.php" would be uploaded to the root of the server - you get the idea.


I've been using it for months now and can never go back to using a seperate FTP program when editing text files for websites. The way I have it set up (which is explained in the readme file) all I have to do is hit ctrl-4 and the current file is saved and FTPed to the directory it should be in on my server.

For those that are curious, its coded using one batch file, plus a script written in VBScript for WSH (Windows Script Host), which has been native to Windows since at least Windows 2000.

For a download and the full instructions, go here:http://www.wrongname.com/projects/

Hope this helps some people. I know its made my life a lot easier.

Kevin
wnent
Posts: 12
Joined: Mon Aug 15, 2005 9:34 pm
Location: Fort Collins, CO
Contact:

Post by wnent »

Forgot to mention that if anyone uses this and has suggestions, I'd certainly like to hear them. Have a great day,

Kevin
wnent
Posts: 12
Joined: Mon Aug 15, 2005 9:34 pm
Location: Fort Collins, CO
Contact:

Post by wnent »

I'm just curious if anyone is actually using this. At this point there's no way I could go back to using an FTP program separate from TextPad. A while back I added a function to download a copy of the file you're working on that's on the server.

I use this to upload files to four different servers with completely different login info, all just by hitting one shortcut key...the script figures out which server and directory the file needs to be uploaded to. I really hope someone else is finding it useful.

Let me know if you're using this and have a good one,

Kevin
kstatham
Posts: 1
Joined: Tue Apr 03, 2007 4:54 pm

Post by kstatham »

I'm considering downloading and trying TextPad based only on this feature. But it must support SFTP, as that's the only reason I'm looking for a new text editor (our host switched recently to all SFTP).

Does this support SFTP?

thanks,
Ken
KevBurns
Posts: 1
Joined: Fri Apr 27, 2007 4:56 am

Post by KevBurns »

This would be a great add-on, but i'm having trouble getting it to work.

Code: Select all

C:\Program Files\TextPad 5\add-ons\tlmftp\tlmftp.vbs(71, 2) Microsoft VBScript runtime error: Invalid procedure call or argument: 'Left'

Invalid command.
-= Less Talk, More Code =-
User avatar
Bob Hansen
Posts: 1517
Joined: Sun Mar 02, 2003 8:15 pm
Location: Salem, NH
Contact:

Post by Bob Hansen »

I use Filezilla which is free, has a command line interface, so it can be set up as tool with TextPad. Is does support SFTP.

More info available at http://filezilla.sourceforge.net/
Hope this was helpful.............good luck,
Bob
Post Reply