Swiss File Knife
a command line
free external tools,
- 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-i686.exe sfk and chmod +x sfk then ./sfk - Linux: type mv sfk-linux.exe sfk and chmod +x sfk then ./sfk OS X and Linux syntax may differ, check the help within the tool.
sfk ftpserv [-h[elp]] [-port=nport] [-rw] [workdir] The SFK Instant FTP Server for easy file transfer. default behaviour since SFK 126.96.36.199: * the CURRENT DIRECTORY is made accessible, WITH subdirs. * any kind of directory traversal (.., / etc.) is blocked. * just ONE CLIENT (browser etc.) can connect at a time. if another client connects, the first is auto closed. * after 60 seconds of inactivity, the connection is closed. * filenames with accents are sent as is (no UTF8 support). * with -rw, files of any size can be written (no size limit). * with -rw, existing files are overwritten without asking. options: -port=n use other port than default, e.g. -port=10000. -port2=n alternative port, used if first port fails. use -port2=0 to disable alternative port. -pw=x require primitive authentication, i.e. client must provide password x to login. you may also set an environment variable like: SET SFK_FTP_PW=mypassword -user=x require this username. if not specified then any username can be used. can also be given by environment variable SFK_FTP_USER. -timeout=n set timeout to n seconds. default is 60. -rw allow read+write access. default is readonly. -maxsize=n set size limit per file write to this, e.g. 10m = 10 mbytes. default is no size limit. -minspace=n set required free disk space for file writing, e.g. -minspace=200m requires 200 megabytes. -noclone do not try to replicate time stamps on a file transmission from an sfk ftp client. -verbose list the transmitted ftp commands. helpful to get more infos in case of errors. -quiet[=2] print less or no status informations. -nosub block sub directory access, e.g. the client may NOT say "put the/sub/dir/document.txt". -run allow client to execute system commands. requires -pw option being set as well. requires an sfk ftp client to run commands. -runpw=x require authentication only for run commands. can also be set via the environment: SET SFK_FTP_RUNPW=mypassword -ownip=x if client sends PASV command, by default the -ownip x server replies with the first network interface IP found. if this is the wrong one, you may supply a different IP here (as n.n.n.n). -noclose do not auto close first client connection if another client tries to connect. specific single work dir: instead of making the current directory accessible you may set a folder name like sfk ftpserv mydir to allow access to these contents only. multi directory mappings: instead of making the current directory accessible, you may specify folders (with virtual names) like: -usedir C:\audiofiles D:\images=pic NOTE: be aware that ANYONE may connect to your server. with -rw specified, ANYONE may also write large files. if this is a problem, do NOT use sfk ftpserv, but download and install a full-scale ftp server like filezilla. aliases: sfk sftserv ... = the same as sfk ftpserv, but using port 2121. file attributes since SFK 1.6.7, if an SFK server speaks with SFK client, linux file attributes are sent and written at the receiver, except for file owner 'rw' flags which are set by default to allow rewrite in future transfers. when sending from linux to windows attributes like 'x' get lost. problems and solutions: if you try to login to the server using a regular ftp client, but you cannot connect and/or transfer files, then usually there is a firewall or network configuration incompatible to normal FTP. - if your ftp client provides a command "passive", then type that, press enter, and then try the usual commands like dir, get or put. - whenever possible, use the sfk ftp client to connect to an SFK FTP server. client and server will then use a different protocol (SFT) with which you often can transfer files even if normal FTP fails. - Windows Vista, Windows 7: the firewall may stop sfk to sfk file transfer on the default port 21, with error ECONNRESET, probably because sfk uses a different protocol. You then have to use a different port, e.g. -port=5000 or use Windows' "ftp" command. - Windows 7 Starter: you may have to open the firewall settings and enable incoming connections for application "sfk" manually. - Windows: whenever running sfk.exe in an ununsual user context, e.g. from a mounted virtual drive, or a non-admin shell, this may cause the system to block incoming connections. - some FTP clients must be configured not to use multiple transfer connections in parallel (FileZilla: edit/settings/transfers) - virtual machines: when using NAT network adapter mode you may not connect from the host into the guest but only vice versa. you may configure port forwards in the VM's adapter settings, then connect to 127.0.0.1:portnumber but not to the IP shown in the guest. also read the VM's help on adapter modes. known compatible ftp clients: WinSCP (in FTP mode), WS_FTP95, FileZilla, command line ftp known incompatible ftp clients: Windows Explorer FTP (requires unsupported multi connections) see also: - type "sfk ftp" for the sfk ftp client. when it connects to an SFK FTP server, you get easier connectivity and more features. - type "sfk httpserv -h" for the SFK Instant HTTP Server. examples - to run sfk as a 'real' ftp server for non sfk clients: (uses port 21. sfk ftp clients may also connect, but see possible problems listed above.) sfk ftpserv -user=foo -pw=bar mydir require the given user/pw and allow read only access to mydir and all subdirectories of mydir. sfk ftpserv -rw -usedir website/images=pic /Musik/audio=audio allow read/write access to website/images with virtual folder name "pic" and to /Musik/audio as just "audio". - if you just want quick and simplest file transfer between two machines both having sfk, use this: sfk sftserv -rw run an sfk simple file transfer server, using port 2121, allowing read/write access to current dir and all sub dirs. then use "sfk sft" at the client side. should no connection be possible run the server and/or client with admin rights and check the firewall settings. file transfer between windows and vmware linux the sfk ftpserv function was originally created to enable file transfer between a windows host and vmware guest OS, as I saw no other way to accomplish this. for detailed instructions, read on here.
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).
read more about all sfk functions here.