How to do things
AI Noob vs. Pro

List biggest files
List newest files
Show subdir sizes
Search in files
Replace word in files
List dir differences
Send files in LAN

Free Open Source:

Swiss File Knife

a command line
multi function tool.

remove tabs
list dir sizes
find text
filter lines
find in path
collect text
instant ftp or
http server
file transfer
send text
patch text
patch binary
run own cmd
convert crlf
dup file find
md5 lists
fromto clip
hexdump
split files
list latest
compare dirs
save typing
trace http
echo colors
head & tail
dep. listing
find classes
speed shell
zip search
zip dir list

Depeche View
Source Research
First Steps

windows GUI
automation

command line
file encryption

free external tools,
zero install effort,
usb stick compliant:

zip and unzip
diff and merge
reformat xml
reformat source

cpp sources

log tracing
mem tracing
hexdump
using printf

articles

embedded
stat. c array
stat. java array
var. c array
var. java array
view all text
as you type
surf over text
find by click
quick copy
multi view
find nearby
fullscreen
bookmarks
find by path
expressions
location jump
skip accents
clip match
filter lines
edit text
highlight
load filter
hotkey list
receive text
send in C++
send in Java
smooth scroll
touch scroll
fly wxWidgets
fly over Qt
search Java

Show portable version informations embedded in binary files under windows, linux and macintosh, on the command line or in batch files. Embed a simple string version info in your programs without the need for non portable manifest files.
  • Download the free Swiss File Knife Base from Sourceforge.
  • Open the Windows CMD command line, Mac OS X Terminal or Linux shell.
  • OS X : type mv sfk-mac-64.exe sfk and chmod +x sfk then ./sfk
  • Linux: type mv sfk-linux-64.exe sfk and chmod +x sfk then ./sfk. OS X and Linux syntax may differ, check the help within the tool.
sfk version filename
sfk ver -own

print version of a binary file, or of sfk itself.
this function can be used:

1. with binary files containing a portable version string:

   $version:name=sfk,type=base,os=windows,vernum=1.5.1,fix=0,
   title=Swiss File Knife,date=Aug  2 2008,info=major rework$\0

2. with windows binaries, where only file version and bitsize
   are extracted, and shown with the file modification time.
   if a product version is found that differs from the file
   version it is shown in the info field.

version string fields:
 [2] *name    short name, usually similar to the executable name
 [3]  type    the type of edition, e.g. base or extended
 [4] *os      operating system, e.g. windows, linux-lib6, linux-lib5
 [5] *vernum  version number, any number of values separated by dots
 [6]  fix     fix level, e.g. a revision or service pack number
 [7] *title   long, descriptive name, as printed in a help text
 [8] *date    release or compile date
 [9]  info    additional infos or remarks, free text string

fields marked with "*" are mandatory for a valid version string.
the other fields can be left out, or be empty like ",fix=,".
if found, contents are printed TAB-separated, after the filename,
therefore the [] numbers given above are output column numbers,
not the location in the input string (which is random anyway).

options
   -num[ber]  just print the full version number, combining
              vernum and fix to a dotted string.
              cannot be used with -own.
   -verbose   tells a warning if file(s) contain no version.
   -win[dows] compact display of file, os, version and filetime
              which is all that's shown for windows binaries.

aliases
   sfk winver  - same as sfk ver -win to primarily list
                 windows file version infos.

see also
   sfk require - check if a required version is used.

web reference
   http://stahlworks.com/sfk-version

examples
   sfk ver dview.exe
      print the version of a Depeche View executable.
   sfk ver -own
      print sfk's version.
   sfk ver.
      print sfk's version (quickest).
   sfk ver . .exe
      show the version of all .exe files within
      the current folder and all sub folders.
   sfk ver -nosub . .exe +filt -ssep "\t" -sform "$-20.20col1\t$col5"
      search all .exe files of the current dir for versions,
      reformatting the output, with a 20 chars filename limit.

 
version embedding example for C/C++ programs

   Add to your source code:

      #define SOFTWARE_VERSION 101  // meaning 1.01
   
      #define OS_SHORT_NAME "linux" // or "windows", "mac"
   
      #define STRINGIFY(x) #x
      #define TOSTRING(x)  STRINGIFY(x)
      #define SOFTWARE_VERTEXT TOSTRING(SOFTWARE_VERSION)
      
      static const char *pGlblVersionText =
         " $version:name=footool,vernum=" SOFTWARE_VERTEXT ","
         "title=The Foo Bar Tool,"
         "os=" OS_SHORT_NAME ","
         "date=" __DATE__ " " __TIME__ "$\0";
   
      void printHelpText()
      {
         // NOTE: this dummy operation is required with some compilers
         //       to keep pGlblVersionText from being stripped by the linker,
         //       as it isn't used anywhere within the code.
         printf("%c", *pGlblVersionText);
   
         // ... (print actual help text)
      }

   After compile, extract version like:

      sfk version footool.exe

   Example output:

      footool.exe  footool  linux  101  The Foo Bar Tool  Apr 20 2013 08:58:40
sfk version filename
sfk ver -own

print version of a binary file, or of sfk 
itself. this function can be
used:

1. with binary files containing a portable 
version string:

   $version:name=sfk,type=base,os=windows,
   vernum=1.5.1,fix=0, title=Swiss File
   Knife,date=Aug 2 2008,info=major
   rework$\0

2. with windows binaries, where only file 
version and bitsize  are extracted, and
shown with the file modification time.
if a product version is found that differs
from the file version it is shown in the
info field.

version string fields:
 [2] *name    short name, usually similar 
              to the executable name
 [3]  type    the type of edition, e.g. 
              base or extended
 [4] *os      operating system, e.g. 
              windows, linux-lib6,
              linux-lib5
 [5] *vernum  version number, any number of 
              values separated by dots
 [6]  fix     fix level, e.g. a revision or 
              service pack number
 [7] *title   long, descriptive name, as 
              printed in a help text
 [8] *date    release or compile date
 [9]  info    additional infos or remarks, 
              free text string

fields marked with "*" are mandatory for a 
valid version string. the other fields can
be left out, or be empty like ",fix=,".
if found, contents are printed 
TAB-separated, after the filename,
therefore the [] numbers given above are 
output column numbers,
not the location in the input string (which 
is random anyway).

options
   -num[ber]  just print the full version 
              number, combining vernum and
              fix to a dotted string.
              cannot be used with -own.
   -verbose   tells a warning if file(s) 
              contain no version.
   -win[dows] compact display of file, os, 
    version and filetime
              which is all that's shown for 
              windows binaries.

aliases
   sfk winver  - same as sfk ver -win to 
                 primarily list windows
                 file version infos.

see also
   sfk require - check if a required 
                 version is used.

web reference
   http://stahlworks.com/sfk-version

examples
   sfk ver dview.exe
      print the version of a Depeche View 
      executable.
   sfk ver -own
      print sfk's version.
   sfk ver.
      print sfk's version (quickest).
   sfk ver . .exe
      show the version of all .exe 
      files within the current folder and
      all sub folders.
   sfk ver -nosub . .exe +filt -ssep "\t" 
                           -sform "$-20.
                           20col1\t$col5"
      search all .exe files of the current 
      dir for versions, reformatting the
      output, with a 20 chars filename
      limit.

 
version embedding example for C/C++ programs Add to your source code: #define SOFTWARE_VERSION 101 // meaning 1.01 #define OS_SHORT_NAME "linux" // or "windows", "mac" #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x) #define SOFTWARE_VERTEXT TOSTRING(SOFTWARE_VERSION) static const char *pGlblVersionText = " $version:name=footool,vernum=" SOFTWARE_VERTEXT "," "title=The Foo Bar Tool," "os=" OS_SHORT_NAME "," "date=" __DATE__ " " __TIME__ "$\0"; void printHelpText() { // NOTE: this dummy operation is required with some compilers // to keep pGlblVersionText from being stripped by the linker, // as it isn't used anywhere within the code. printf("%c", *pGlblVersionText); // ... (print actual help text) } After compile, extract version like: sfk version footool.exe Example output: footool.exe footool linux 101 The Foo Bar Tool Apr 20 2013 08:58:40

you are viewing this page in mobile portrait mode with a limited layout. turn your device right, use a desktop browser or buy the sfk e-book for improved reading.

 
sfk is a free open-source tool, running instantly without installation efforts. no DLL's, no registry changes - just get sfk.exe from the zip package and use it (binaries for windows, linux and mac are included).

 

the Endless Image 🍣 Sushi