Utilities

There are 4 essential utilities included with XSharper: display version info, zip files, unzip archive, and to download a file from URL. They are not replacements for real zip/unzip/wget utilities, but do provide sufficient functionality for many scenarios and batch scripts w/o the need to download and install additional tools.

These utilities are actually XSharper scripts embedded into xsharper.exe, and source code can be seen/modified by adding //save parameter to command lines (e.g. xsharper //zip //save zip.xsh) .

Version info

Display version info and Xsharper's environment variables.

C:\> xsharper //version
XSharper v.0.9.1051.0 DeltaX Inc. Copyright (c) 2006-2009

Environment:
====================
Operating system    : Microsoft Windows NT 5.2.3790 Service Pack 2
.NET Framework      : 2.0.50727, 3.0, 3.5
Current directory   : R:\
Privileges          : Administrator
XSharper executable : c:\util\XSharper.exe
Configuration file  : c:\util\XSharper.exe.config (does not exist)

Environment variables:
=======================
XSH_PATH            :
XSH_REF             :
XSH_COLORS          :

ZIP

Store C:\Hello directory into a .ZIP archive C:\hello.zip:

R:\>xsharper //zip c:\hello.zip c:\Hello
Compressing c:\Hello => c:\hello.zip ...
  c:\Hello\app.config
  c:\Hello\compile_hello.bat
  c:\Hello\dumpheader.xsh
  c:\Hello\hello.cs
  c:\Hello\hello.exe
  c:\Hello\hello.pdb
  c:\Hello\manifest.xml
  c:\Hello\x.cs
  c:\Hello\xsh.ico
  c:\Hello\XSharper.Core.dll
  c:\Hello\XSharper.Core.dll.gz
Completed

There are many additional parameters available, for recursive compression, password protection, to help with hidden files & directories etc. Run xsharper //zip /? for more details.

UnZIP

Extract C:\hello.zip to C:\Hello2 (created if does not exist):

C:\>xsharper //unzip c:\hello.zip c:\hello2
Extracting c:\hello.zip => c:\hello2\ ...
  c:\hello2\app.config
  c:\hello2\compile_hello.bat
  c:\hello2\dumpheader.xsh
  c:\hello2\hello.cs
  c:\hello2\hello.exe
  c:\hello2\hello.pdb
  c:\hello2\manifest.xml
  c:\hello2\x.cs
  c:\hello2\xsh.ico
  c:\hello2\XSharper.Core.dll
  c:\hello2\XSharper.Core.dll.gz
Completed

Run xsharper //unzip /? for more details.

Download a file

wget it is not. Simply download data from the specified URL and save it to a file. If filename is not specified, file is saved to the current directory.

C:\>xsharper //download http://www.xsharper.com/xsharper.exe
Downloading http://www.xsharper.com/xsharper.exe => C:\xsharper.exe ...
...
Completed. 343040 bytes downloaded.