SFK Run: need subdirectory part of path

  • Volker Bijewitz

    Volker Bijewitz - 2011-11-14


    First, much thanks for this usefull tool! Great work!

    I want to do a merge operation using the "sfk run" command. The target is a directory tree that contains the base image for our installer. The source is a directory tree that contains some configuration files, the tree structure is the same like in the target. The goal is to merge each ".cbrcf" file in the source tree into its counterpart in the source tree. Both locations are known by UNC-pathes.

    My merge utility takes two filenames to do its work. SKF does a perfect work to scan the tree to be merged and call the utility for each entry. But I have a problem to build the second argument, the merge target filename. There are two problems:

    1.) I can not input a second URL as "userdefined parameter"

    This problem I can handle by using relative pathes. I can take $Path and stick it together with a relative path like "..\..\MyTarget". Bit it would be nice to have the possibility to pimp the "run"-functions with additional parameters over the SFK commandline.

    2.) I do not know the relative path of the file

    The file can be on different folders in a different depth, like


    So, to make this work, I need the relative path part from the base directory where SFK starts to read the tree. So I could build the second parameter like this:


    Is there a way that I have not found until now? Or is it possible to implement it?

    Best Regards,

    Volker Bijewitz

  • Volker Bijewitz

    Volker Bijewitz - 2011-11-15


    I found it: the option "-relnames" is my friend in this case!

    Best Regards,

    Volker Bijewitz

  • stahlworks

    stahlworks - 2011-11-21

    Good to hear that -relnames seems to do the job for you.
    If this however is just a partial solution of your issue,
    then please give a syntax example how sfk run might be extended.

  • Volker Bijewitz

    Volker Bijewitz - 2011-11-23

    Thank you, I got it working now. At the moment there is no need for a extension of the run command.

    I was thinking about a sort of constants that can be inserted into the commandline. In InnoSetup I have the ability to insert constants into strings that get filled from external sources. With this constants I can fill a part of the string from shell folder constants, environment variables, registry, ini, script output and a lot of other things. Jordan uses curly brackets as inentifier for string constants, that looks like this:

    {userdesktop}, {ini:Filename,section,key|DefaultValue}, {reg:HKxx\SubkeyName,ValueName|DefaultValue}, {%EnvironmentVariable|DefaultValue}

    I have written some time ago a string constant parser class in C++ to do the job to inflate constants like this. If you like I can send you the sourcecode if you like to.

    Best Regards,



Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks