Archive

Archive for April, 2006

automate ftp

Following script login to ftp host and put the file specified in the command line argument.
$ doput.sh this-file.txt

—–Start of script——
# doput.sh
#!/bin/ksh

type=ascii
if [ -n "$2" ]
then
type=$2
fi

ftp -i -v -n hostname
user anonymous anonymous@anonymous.net
$type
put $1
bye
—–End of script—–

Categories: Uncategorized

How To Set Up an FTP Server in Windows 2000

04/14/2006 mynotes Comments off

This article was previously published under Q300662

http://support.microsoft.com/default.aspx?scid=kb;en-us;300662&sd=tech
Article ID : 300662
Last Review : July 15, 2004
Revision : 3.1

SUMMARY
This article provides a step-by-step guide for setting up a File Transfer Protocol (FTP) server in Windows 2000 environment for anonymous access.

Installing Internet Information Services
Because FTP depends on Internet Information Services (IIS), you must first make sure that IIS is installed. To install IIS and the FTP service, follow these steps:

  1. Click Start, point to Settings, and then click Control Panel.
  2. In Control Panel, double-click Add/Remove Programs.
  3. Select Add/Remove Windows Components.
  4. In the Windows Components Wizard, select Internet Information Services (IIS), then click Details.
  5. Select Common Files, Documentation, File Transfer Protocol (FTP) Server, and Internet Information Services Snap-In, and then click OK.
  6. Click Next.
  7. If you are prompted to configure Terminal Services, click Next.
  8. If you are prompted for a path for a FTP root folder, type a suitable folder path. The default is C:\Inetpub\Ftproot. For additional security, an NTFS drive is preferred. Click OK to continue.
  9. When you are prompted, insert the Windows 2000 CD or provide a path to the location of the files, and then click OK.
  10. Click Finish.

IIS and the FTP service are now installed, but you must configure the FTP service before you can use it.

Configuring The FTP Service
To configure the FTP service, follow these steps:

  1. Click Start, click Programs, click Administrative Tools, and then click Internet Services Manager. (In Windows 2000 Professional, you can access Administrative Tools from Control Panel.)
  2. Click the plus sign (+) next to the server name.
  3. Right-click Default FTP Site, and then click Properties.
  4. Click the Security Accounts tab.
  5. Select Allow Anonymous Connections, and then select Allow Only Anonymous Connections.
  6. Click the Home Directory tab.
  7. Select Read and Log Visits, and clear Write.
  8. Click OK to save these settings.

The server is now configured to accept incoming FTP requests. The files that you want to make available should now be copied into the folder for access.

Example
$ ftp ip.address.of.local.machine
$ user anonymous

Categories: Uncategorized

Editplus Tips

04/05/2006 mynotes Comments off

How to copy file path of current open file using shortcut key

    write following script and save as copy.vbs

    strCopy = Wscript.Arguments(0)
    Set objIE = CreateObject("InternetExplorer.Application")
    objIE.Navigate("about:blank")
    objIE.document.parentwindow.clipboardData.SetData "text", strCopy
    objIE.Quit

    Add following in User Tools
        Menu Text:  copy-filepath
        Command:    cscript //Nologo [fully-qualified-path]\copy.vbs
        Argument:   "$(FilePath)"

        Check Close window on exit

DOS (Current Location)

    Menu Text:  CMD
    Command:    cmd.exe
    Argument:   "$(FileDir)"

Explorer (Current Location)

    Menu Text:  Explorer
    Command:    %SYSTEMROOT%\explorer.exe /e,/root,\local disk,
    Argument:   "$(FileDir)"

    Check "Close window on exit"

Validate XML

    Download validate-xmlvbs.txt script and save as validate-xml.vbs

    Menu Text:  Validate XML
    Command:    cscript //Nologo [fully-qualified-path]\validate-xml.vbs
    Argument:   "$(FilePath)"

    Check "Capture output"
Categories: Uncategorized

dumpNameSpace.bat

04/05/2006 mynotes Comments off

The WebSphere Application Server provides a JNDI-based utility that dumps information about the WebSphere name space. The naming service for the WebSphere Application Server host must be running to use this utility. To run the utility, run the following command:

was_home/bin/dumpNameSpace.bat [-keyword value]

where keywords and values include:

-host hostname
WebSphere host whose namespace you want to dump. The default is the local host.

-report [short | long]

short
Dumps the binding name and bound object type, which is essentially what JNDI Context.list()provides.

long
Dumps the binding name, bound object type, local object type, and string representation of the local object (that is, IORs, string values, and so forth, are printed).

Use the help parameter to view a complete list of keywords and values you can specify:

was_home/bin/dumpNameSpace.bat -help

Categories: Uncategorized