Script Help - copying file sizes to clipboard

Hello,
I’m trying to write a DirOpus script that copies the file size and the file size on disk (both in bytes) to the clipboard. Ideally they would be separated by a tab, but I would be satisfied if it worked at all. This is what I’ve come up so far (Admittedly, I’m really not good at vbscript programming).

@script vbscript Set size_of_file = (DOpus.FSUtil.Newfilesize) Set size= ("size_of_file.cy") DOpus.AddClip(size)

Can anybody help me?

Thx in advance

A quick attempt in jscript, assuming your blocksize is 4096 for the partition the file resides on.

@script jscript var fileSize = DOpus.Listers.LastActive().ActiveTab.selected_files(0).size.cy*10000; var fileSOnD = Math.ceil(fileSize/4096)*4096; DOpus.SetClip(fileSize+" \t"+fileSOnD);

thank you so much tbone,

it worked out perfectly :smiley: