On 26.11.2008 19:20 in vtech-tips LeRoy Stevens wrote:
>
> Another scenario, in this case I want to create separate files for
> each search block found. Trying to use buffer#12 and concatenate
> that variable to filename (I don't need extension but it would be
> helpful) with command:
>
> Block_Save_As("C:\Temp\CTX|@(12)", Block_Begin, Block_End)
>
> was attempting to create file "C:\Temp\CTX 6" or what ever number
> the register 12 is at.
>
> If I could create "C:\Temp\CTX 6.txt" that would be great.
>
> [...] Block_Save_As("C:\Temp\CTX|@(12)", Block_Begin, Block_End)
// Create files with name like "C:\Temp\CTX00006.txt"
// (if #12 contains the value 6 in this example)
//
Reg_Set(103, "C:\Temp\CTX") // beginning of filename
Num_Str(#12, 103, FILL+NOCR+APPEND) // append 0-padded number
Reg_Set(103, ".txt", APPEND) // append extension
Block_Save_As("|@(103)", Block_Begin, Block_End) // use t-reg 103
Christian