#1 2006-12-10 16:46

Cld
Member
Registered: 2006-12-10
Posts: 7

Export file names in clipboard

Hello Denis,
you progs are really great! Sincere compliments. wink
There is a thing that I'm unable to do in ReNamer, though it is not just a "renamer" thing.
I would like to export just the filenames, without suffix, in an text file, or better in the clipboard.
I've seen that the button "Option" in the middle of the window has the entry "Export list of files and new names", but there isn't just a "Export new names", or an "Export list of files without path and suffix" . In add I really appreciate the clipboard capability.

Thank you for your attention.

Regards,
Claudio.

Offline

#2 2006-12-10 19:43

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Export file names in clipboard

Hi Claudio!

As you said, you already noticed the "Export list of files and new names" option. Do you know that if you export into CSV file, you can open that file in MS Excel, and list of files and list of new names will appear in separate columns. So you can easily select and copy into buffer the list of all new names.

If that is not suitable option for you, PascalScript can write all of the new names into a text file. And if you tell me in which way you want them to be written (one-per-line for example) - I will write that short script for you.

Offline

#3 2006-12-10 21:01

Cld
Member
Registered: 2006-12-10
Posts: 7

Re: Export file names in clipboard

Thank you very much for the quick answer.
Yes, the PascalScript seems to be the best solution, just to avoid the Excel step. Currently I use a .cmd file with a "dir /b" to obtain just the filename, and a little awk step with a "{sub(/\..*$/,\"\")" to remove the suffix. It could be great if I can do that all inside your program.
Are you aware if I could redirect the output into the clipboard with PascalScript, instead of a text file? This should be the optimum for me (so I can directly paste the result in my CD label printing program after the renaming...).

Regards, Claudio.

Offline

#4 2006-12-10 22:56

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Export file names in clipboard

OK, I've added two new functions to PascalScript: SetClipboardText and GetClipboardText.

You need to download the latest dev version: ReNamerBeta.zip

And below is the script that will do the trick:

var S: WideString;
begin
  S := S + FileName + #13#10;
  SetClipboardText(S);
end.

Offline

#5 2006-12-11 00:58

Cld
Member
Registered: 2006-12-10
Posts: 7

Re: Export file names in clipboard

I can't believe... you're great!
I haven't received a similar support from any commercial program I have bought!

I have modified your script in:

var S: WideString;
begin
  S := S + WideExtractBaseName(FileName) + #13#10;
  SetClipboardText(S);
end.

just to remove suffix, which I don't need. I hope to have correctly used the right function.

I have also just made a little donation for your good skill and kindness.

Regards, Claudio.

Offline

#6 2006-12-11 15:01

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Export file names in clipboard

Yes, you've used the right function and used it correctly!

P.S. Thanks for donation! smile

Offline

Board footer

Powered by FluxBB