Version 1.9

The Swiss File Knife Book

Version 1.9.8

Copyright (c) 2020 by StahlWorks Technologies

Only for personal use on devices of the PDF file purchaser. Printing is allowed for up to three copies per purchased PDF file.

contents

The Swiss File Knife Five Dollar Book

index

2 / 374

Table of contents

Touch any number to jump to that page. In every page, touch on contents to jump back here.

Introduction

How to do things the same way on all computers How to get the SFK tool running instantly The different editions of SFK: OSE, Base, XE

9 10 13

Tutorial

File handling List all files of a folder, and all sub folders List only selected files in selected sub folders List files using wildcards List the latest or biggest files Find a file quickly in the current directory tree List different files between two folders Run a command on all files of a folder Rename files quickly using patterns List the size of directory tree contents Copy a folder, or parts of it, or only updates Delete or clean up specific files in a folder How to use index files for fast filename lookup Tell where in the PATH a command is run from Create checksums of files Find duplicate files

Find and replace within files Find words in text and binary files Replace words in text and binary files Flexible filter and replace in a single text file Search in files using wildcards and Expressions

14

14 15

16 16 17

18 19 21

23 24 26

27 29 30

31

32 33

34 35

contents

The Swiss File Knife Five Dollar Book

index

3 / 374

File conversion and processing Convert plain text files between Windows/Linux format Remove TAB characters from text Split large files Collect many text files into one large text Sort text lines alphabetically

Send files via network How to send a file from one computer to another How to transfer many files, or just changed ones

Further useful functions Read or write the clipboard under Windows Convert CSV data to tab separated text Count text lines Write long commands into a script Search environment variables for words

36 37 38

39 40

42 44

46 48

41 50 51

Backup and transfer of folders A script to backup files to an USB drive Sync holiday snapshot name changes to USB drive Copy a project folder to a new version Upload project files to a build server Optimizing file uploads by modification date

52 59 60

61 63

Xed detailed examples reformat comma separated data convert fixed column data to CSV convert CSV data to XML data convert XML data to CSV data cleaning up a translation file extract two letter words from text

64 65 66

67 69 71

72

contents

The Swiss File Knife Five Dollar Book

Large script examples Wiki markup text to HTML conversion using sfk script and xed

HTTP Scripting and Test Automation using sfk script, call, web, perline, xex

Filling an XML file with program meta data using sfk script, xex, version, list, calc, filter, setvar, getvar, xed

A detailed perline example

Script creation and debugging tips

index

4 / 374

73 78

83 90

93

contents

The Swiss File Knife Five Dollar Book

index

5 / 374

Command Reference

General infos

95

Windows/Linux/Mac syntax differences

97

file system

sfk list

- list directory tree contents.

98

list latest, oldest or biggest files.

list directory differences.

list zip jar tar gz bz2 contents.

sfk filefind - find files by filename

262

sfk treesize - show directory size statistics

120

sfk copy

- copy directory trees additively

222

sfk sync

- mirror tree content with deletion

222

sfk rename

- flexible multi file rename

226

sfk partcopy - copy part from a file into another one 207

sfk mkdir

- create directory tree

232

sfk delete

- delete files and folders

117

sfk deltree - delete whole directory tree

117

sfk deblank - remove blanks in filenames

170

sfk space [-h] - tell total and free size of volume 218

sfk filetime - tell times of a file

220

sfk touch

- change times of a file

254

sfk index

- create index file(s) for fast lookup 104

sfk name

- lookup file names using index files

106

sfk fixfile - change bad filenames and file times

291

sfk setbytes - set bytes at offset within a file 349

compression sfk zip sfk zipto sfk unzip sfk checkzip

- create zip file from folder - zip selected file list - list or extract zip file - verify zip file content

353 356 358

361

conversion

sfk oload

- load office file content as text

251

sfk lf-to-crlf - convert from LF to CRLF line endings

118

sfk crlf-to-lf - convert from CRLF to LF line endings

120

sfk detab

- convert TAB characters to spaces

115

sfk entab

- convert groups of spaces to TAB chars

116

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download