1 .\sfk190.exe
1 SFK - The Swiss File Knife Multi Function Tool. 2 Release 1.9.0 Base/XD of Feb 28 2018. 3 StahlWorks Technologies, http://stahlworks.com/ 4 Distributed for free under the BSD License, without any warranty. 5 6 type "sfk commandname" for help on any of the following. 7 some commands require to add "-help" for the help text. 8 9 file system 10 sfk list - list directory tree contents. 11 list latest, oldest or biggest files. 12 list directory differences. 13 list zip jar tar gz bz2 contents. 14 sfk filefind - find files by filename 15 sfk treesize - show directory size statistics 16 sfk copy - copy directory trees additively 17 sfk sync - mirror tree content with deletion 18 sfk rename - flexible multi file rename 19 sfk partcopy - copy part from a file into another one 20 sfk mkdir - create directory tree 21 sfk delete - delete files and folders 22 sfk deltree - delete whole directory tree 23 sfk deblank - remove blanks in filenames 24 sfk space [-h] - tell total and free size of volume 25 sfk filetime - tell times of a file 26 sfk touch - change times of a file 27 sfk index - create index file(s) for fast lookup 28 sfk name - lookup file names using index files 29 sfk fixfile - change bad filenames and file times 30 sfk setbytes - set bytes at offset within a file 31 32 conversion 33 sfk lf-to-crlf - convert from LF to CRLF line endings 34 sfk crlf-to-lf - convert from CRLF to LF line endings 35 sfk detab - convert TAB characters to spaces 36 sfk entab - convert groups of spaces to TAB chars 37 sfk scantab - list files containing TAB characters 38 sfk split - split large files into smaller ones 39 sfk join - join small files into a large one 40 sfk csvtotab - convert .csv data to tab separated 41 sfk tabtocsv - convert tab separated to .csv format 42 sfk encode - convert data to base64 or hex format 43 sfk decode - decode base64, hex or url format 44 sfk wtoa - convert wide chars to Ansi 45 sfk wtou - convert wide chars to UTF-8 46 sfk hexdump - create hexdump from a binary file 47 sfk hextobin - convert hex data to binary 48 sfk hex - convert decimal number(s) to hex 49 sfk dec - convert hex number(s) to decimal 50 sfk chars - print chars for a list of codes 51 sfk bin-to-src - convert binary to source code 52 53 text processing 54 sfk filter - search, filter and replace text data 55 sfk replace - replace words in binary and text files 56 sfk xed - edit stream text using sfk expressions 57 sfk xex - extract from stream text using expressions 58 sfk xreplace - XE: replace in files using sfk expressions 59 sfk run - run external command on all files of a folder 60 sfk runloop - run a command n times in a loop 61 sfk printloop - print some text many times 62 sfk load - load file content for further processing 63 sfk perline - run sfk command(s) per input text line 64 sfk head - print first lines of a file 65 sfk tail - print last lines of a file 66 sfk snapto - join many text files into one file 67 sfk addhead - insert string at start of text lines 68 sfk addtail - append string at end of text lines 69 sfk joinlines - join text lines split by email reformatting 70 sfk strings - extract strings from a binary file 71 sfk sort - sort text lines produced by another command 72 sfk count - count text lines, filter identical lines 73 sfk linelen - tell length of string(s) 74 75 search and compare 76 sfk xfind - search in text and binary files using 77 wildcards and simple expressions 78 sfk xtext - search in text files only 79 sfk xhexfind - search with hexdump output 80 sfk extract - extract data from text and binary 81 sfk find - search static text, without wildcards 82 sfk hexfind - search static binary data 83 sfk md5gento - create list of md5 checksums over files 84 sfk md5check - verify list of md5 checksums over files 85 sfk md5 - calc md5 over a file, compare two files 86 sfk pathfind - search PATH for location of a command 87 sfk reflist - list fuzzy references between files 88 sfk deplist - list fuzzy dependencies between files 89 sfk dupfind - find duplicate files by content 90 91 networking 92 sfk httpserv - run an instant HTTP server. 93 type "sfk httpserv -help" for help. 94 sfk ftpserv - run an instant FTP server 95 type "sfk ftpserv -help" for help. 96 sfk ftp - instant anonymous FTP client 97 sfk web - send HTTP request to a server 98 sfk wget - download HTTP file from the web 99 sfk tcpdump - print TCP conversation between programs100 sfk udpdump - print incoming UDP requests101 sfk udpsend - send UDP requests102 sfk ip - tell own machine's IP address(es).103 type "sfk ip -help" for help.104 sfk netlog - send text outputs to network,105 and/or file, and/or terminal106 sfk fromnet -h - receive and print network text107 sfk ping - ping multiple machines in one go108 109 scripting110 sfk help chain - how to combine multiple commands111 sfk script - run many sfk commands in a script file112 sfk label - define starting points within a script113 sfk call - call a sub function at a label114 sfk echo - print (coloured) text to terminal115 sfk color - change text color of terminal116 sfk setvar - put text into an sfk variable117 sfk storetext - store text in memory for later use118 sfk alias - create command from other commands119 sfk mkcd - create command to reenter directory120 sfk sleep - delay execution for milliseconds121 sfk pause - wait for user input122 sfk stop - stop sfk script execution123 sfk tee - split command output in two streams124 sfk tofile - save command output to a file125 sfk toterm - flush command output to terminal126 sfk for - repeat commands many times127 sfk loop - repeat execution of all commands128 sfk cd - change directory within a script129 sfk getcwd - print the current working directory130 sfk require - compare version text131 sfk time [-h] - print current date and time132 133 development134 sfk bin-to-src - convert binary data to source code135 sfk make-random-file - create file with random data136 sfk fuzz - change file at random, for testing137 sfk sample - print example code for programming138 sfk patch - change text files through a script139 sfk inst - instrument c++ with tracing calls140 141 diverse142 sfk status - send colored status to the SFKTray143 Windows GUI utility for display144 sfk calc - do a simple instant calculation145 sfk random - create a random number146 sfk prompt - ask for user input147 sfk number - print number in diverse formats148 sfk xmlform - reformat xml for easy viewing149 sfk media - cut video and binary files150 sfk view - show results in a GUI tool151 sfk toclip - copy command output to clipboard152 sfk fromclip - read text from clipboard153 sfk env - search environment variables154 sfk version - show version of a binary file155 sfk ascii - list Ansi codepage characters156 sfk ascii -dos - list OEM codepage characters157 sfk spell - phonetic spelling for telephone158 sfk cmd - print an example command159 sfk data - create random test data160 sfk ruler - measure console text width161 sfk license - print the SFK license text162 sfk update - check for SFK updates163 164 help by subject165 sfk samp - example scripts on sfk use and for166 http web access automation167 sfk help select - how dirs and files are selected in sfk168 sfk help options - general options reference169 sfk help patterns - wildcards and text patterns within sfk170 sfk help chain - how to combine (chain) multiple commands171 sfk help var - how to use sfk variables and parameters172 sfk help shell - how to optimize the windows command prompt173 sfk help chars - about locale specific characters174 sfk help nocase - about case insensitive search175 sfk help unicode - about unicode file reading support176 sfk help colors - how to change result colors177 sfk help compile - how to compile sfk on any linux system178 sfk help xe - for infos on sfk extended edition.179 180 All tree walking commands support file selection this way:181 182 1. short format with ONE directory tree and MANY file name patterns:183 src1dir .cpp .hpp .xml bigbar !footmp184 2. short format with a list of explicite file names:185 letter1.txt revenues9.xls report3\turnover5.ppt186 3. long format with MANY dir trees and file masks PER dir tree:187 -dir src1 src2 !src\save -file foosys .cpp -dir bin5 -file .exe188 189 For detailed help on file selection, type "sfk help select".190 191 * and ? wildcards are supported within filenames. "foo" is interpreted192 as "*foo*", so you can leave out * completely to search a part of a name.193 For name start comparison, say "\foo" (finds foo.txt but not anyfoo.txt).194 195 When you supply a directory name, by default this means "take all files".196 197 sfk list mydir lists ALL files of mydir, no * needed.198 sfk list mydir .cpp .hpp lists SOME files of mydir, by extension.199 sfk list mydir !.cfg lists all files of mydir EXCEPT .cfg200 201 general options:202 -tracesel tells in detail which files and/or directories are included203 or excluded, and why (due to which user-supplied mask).204 -nosub do not process files within subdirectories.205 -nocol before any command switches off color output.206 -quiet or -nohead shows less output on some commands.207 -hidden includes hidden and system files and dirs.208 For detailed help on all options, type "sfk help options".209 210 configure your windows CMD.exe properly.211 select many display columns, 3000 lines for scrollback212 and copy/paste of displayed text. "sfk help shell" for more.213 214 beware of Shell Command Characters.215 parameters containing spaces or characters <>|!&?* must be sur-216 rounded by quotes "". type "sfk filter" for details and examples.217 218 beware of Automated Data Processing on different machines.219 if you write scripts for distribution on many Windows machines220 they may behave different, depending on the system codepage.221 to avoid this use -isochars. for details see: sfk help nocase222 223 WRONG COLORS? Use one of:224 set SFK_COLORS=theme:black for DARK backgrounds225 set SFK_COLORS=theme:white for BRIGHT backgrounds226 see also "sfk help colors"227 228 type "sfk ask word1 word2 ..." to search ALL help text for words.229 type "sfk dumphelp" to print ALL help text.230 231 +---------------------------------------------------------+232 | Get the Five Dollar SFK Book: type "sfk book" for more. |233 |---------------------------------------------------------|234 | Browse all text of a folder fast: sfk dview |235 +---------------------------------------------------------+