Zurück - Hauptseite

WS_FTP - Windows - Unix

Author: Ulrich Roos, Hedingen

Non-obvious uses of WS_FTP

Except for the actual file transfer, WS_FTP is very convenient because it solves some WIN-annoyances, e.g. the missing current directory concept from DOS or UNIX, and sometimes is also the last resort to solve file permission problems on the local PC !

Perl/CGI Development without telnet/shell access

I am using WS_FTP to develop small CGI programs in Perl from my Windows-98 PC. The web server runs under Linux/APACHE.
My hosting provider CEVINET allows neither telnet nor ssh connections for program development; only FTP is accepted. The Apache access log is available on the next following day, the error log is not available at all.

I did not install Perl on my PC for various reasons.

When I work on a CGI script, I open WS_FTP and connect to my homepage, regardless of whether I want to transfer anything to the web server at the moment. WS_FTP can remember the connection folders both on the local and on the remote computer (see Option menu). This way I can click on any of my perl programs and edit them using the notepad editor. This saves the nasty navigation from C:\Eigene Dateien\ to my project directory which might look like Q:\web\myhomepage\cgi-bin\ or even worse, and simulates a current directory concept similar to the DOS or UNIX shell.

To test the CGI program, using "Save" and uploading is just two clicks.

Rename a .txt file to .pl

notepad.exe does not like to create a ".pl" file. After creating a file, an attempt to store it with a ".pl" extension fails, it creates myprog.pl.txt instead of myprog.pl. To create a CGI program, I create the file, insert the usual she-bang ( #!/usr/bin/perl -w ) line and close it. Then I change the file name extension to ".pl" using WS_FTP and open it again. From now on notepad will edit myprog.pl and does not attempt to make it a ".txt" file again.

Changing UNIX attributes (chmod) after upload

After uploading the perl code to the CGI directory of my homepage (using the ASCII option), it is still not considered an executable program. Using a right-click on the uploaded program in WS_FTP, remote site, I have to add EXEC permissions. WS_FTP presents a chmod dialog where each permission can be checked (marked) as desired. Note that the contents of the chmod-dialog do not represent the current permissions of the file on the remote server as you might expect - they are arbitrary. Just click the required permissions and OK. - When an improved perl program is uploaded later under the same name, the permission pattern is preserved; chmod is only required after the first upload.

Debugging CGI programs without using telnet

Once a CGI program is written, it must be uploaded and tested. How can this be done without using telnet ?
One of my first programs (which had to be debugged the hard way, by trial and error) was a perl script which verifies the syntax of my other perl scripts. An example of such a CGI program is provided here.
If necessary, your CGI program might write into a log file on the web server - which you can inspect using WS_FTP again.

Delete thumbs.db on Windows-XP

When using the WIN-XP explorer on a directory full of pictures, it creates an undesired file named thumbs.db which contains cached thumbnail images. Typically inadvertent webmasters end up uploading thumbs.db to the web server where it is completely useless. Even worse, I was not able to delete a directory containing images using the Windows-Explorer; it claimed that thumbs.db was in use!
After closing the explorer, WS_FTP could delete the nasty thumbs.db as desired.

Delete a 0-byte size .exe from Windows-XP desktop

Just recently, using Windows-XP with all updates till end of 2004, except SP2, I accidentally created a 0-byte file named something.exe on my desktop - the result of a failed internet download. Windows XP did not allow me to delete this crap file, claiming it is protected/in use ! Neither DOS-prompt nor "My-Computer" did any better but WS_FTP solved also this problem.

Copyrights, Trademarks

Windows-98 and Windows-XP are registered trademarks of MICROSOFT.
The WS_FTP program is copyrighted and offered by ipswitch.com .