2

I have set up Strawberry Perl pl scripts as drop target using Michael's answer How do I make my Perl scripts act like normal programs on Windows?

(I wrote small script for this, because after Strawberry Perl upgrade re-registration is required: https://gist.github.com/Vlado-99/b437cc6cc2ea764b1f74d4f2b8404102).

If I drop "simple" file name, like "report.txt", my script receives "report.txt".

But if I drop long file name, like "report for 2020-01 (sorted).txt", my scripts gets

ARGV[0]='report'
ARGV[1]='for'
ARGV[2]='2020-01'
ARGV[3]='(sorted).txt'

and if I drop name like "C:\PlexLibrary\Chisum (1970)\Chisum(1970).mp4", script gets

ARGV[0]='C:\PLEXLI~1\Chisum'
ARGV[1]='(1970)\Chisum(1970).mp4'

How to:

  1. Prevent filenames broken to more parts,
  2. Prevent use of short DOS 8.3 names instead of Windows long names?

My filesystem is NTFS, Windows is 64-bit Windows 7 Professional, Perl is

C:\>perl --version

This is perl 5, version 30, subversion 2 (v5.30.2) built for MSWin32-x64-multi-thread

Copyright 1987-2020, Larry Wall
brian d foy
  • 129,424
  • 31
  • 207
  • 592
Vlado B.
  • 75
  • 4
  • Possible workaroud with cmd wrapper: see ijprest's answer to https://stackoverflow.com/questions/705851/how-do-i-create-drag-and-drop-strawberry-perl-programs – Vlado B. May 17 '20 at 10:31
  • I am testing this on Windows 10: If I run the script `RegisterStrawberryPerlAsDropTarget.cmd` from CMD as admin, I get *"Please run this script with administrative/elevated permissions."* – Håkon Hægland May 17 '20 at 11:05
  • @HåkonHægland: I missed to say, my Windows is 7, not 10. I have no 10, so I wrote script for 7 only (there are some differences in Michael's description, if I remember). Script warns if you forget to run it elevated - use Run as Administrator, please. – Vlado B. May 17 '20 at 14:35

0 Answers0