WriteFile + FolderReport
Posted: 21 May 2023 21:19
I've managed to get reports to write toa file using this:
I've also managed to get a folderreport to show a text box, and to write to a .txt file using this:
Both work fine, It would just be more helpful if I could make the folderreport write to an .ini file in the same way the writefile does. So I tried this:
Obviously these are basic examples I've manipulated from the manual. Which I am trying to decipher how to use the terms and what terms mean what. I've looked under both the folderreport and writefile sections and see in the writefile section that this is the correct order:
Thank you for your help.
EDIT: Just tried this, cos I think using writefile is perhaps the wrong way to go:
I get a flash of the app window, but no idea what's happening with it! It doesn't create a file at all!
Could someone shed some light on my mistake please?
I'm pretty sure it's the last part, as it works ok without that, but I would prefer it to save to .ini file rather than .txt.
Code: Select all
"Current Folder|:cliptext" writefile("- DirList - <curfolder>.ini", report("{Basename}{dir = DIR}<crlf>", , "; <curpath> on <date><crlf><crlf>"));Code: Select all
"Folders List|:cliptext" text folderreport("tree:{dir {name} ({count})}", "r", , "r");Code: Select all
"Current Folder|:cliptext" writefile("- DirList - <curfolder>.ini", folderreport("tree:{dir {name} ({count})}", "r", , "r"); <curpath> on <date><crlf><crlf>"));So, where it says data, is that the correct place to put the syntax for the folderreport syntax? Sorry, I just have no clue what goes where, I'm trying to learn, but I'm not sure what is the correct way to combine these things.Syntax
writefile(filename, data, [on_exist], [mode], [start=1], [numbytes=-1])
Thank you for your help.
EDIT: Just tried this, cos I think using writefile is perhaps the wrong way to go:
Code: Select all
"Folders List|:cliptext" folderreport("tree:{dir {name} ({count})}", "f", , "r", "- DirList - <curfolder>.ini");Could someone shed some light on my mistake please?
I'm pretty sure it's the last part, as it works ok without that, but I would prefer it to save to .ini file rather than .txt.