Windows 7 creating windows shortcuts en-masse (scripted)

HarryPutnam

New Member
Joined
Dec 2, 2010
Messages
4
Setup: Windows 7 Home premium (64bit)

I have need of creating many windows 7 shortcuts to a pile of video files.

This is the first of what will likely be many occasions
.
I don't know any of the windows based scripting languages but do program in perl somewhat. So my first hope is someone may have a perl script that can create windows shortcuts.

Barring that, if someone can explain the mechanism to me, I can write the perl.

But all I know of windows shortcuts is how to create them on context menu, not the mechanism that really tells windows to create one.

If it means I have to learn enough windows programming to do it, then maybe someone can get me started?
 


Solution
Creating Windows shortcuts to video files on Windows 7 can be achieved through scripting or by utilizing Windows functionality directly. I can guide you through the process of creating shortcuts using Perl or if you prefer, I can provide you with the necessary information to create shortcuts on Windows 7 without scripting. Here are the steps to create a Windows shortcut to a video file:
  1. Creating a Shortcut Manually:
    • Right-click on the video file you want to create a shortcut for.
    • Select "Create shortcut."
    • A shortcut to the video file will be created in the same directory. You can then move this shortcut to any location you prefer, such as the Desktop.
    []Creating a Shortcut Using Perl Script: If you...
Creating Windows shortcuts to video files on Windows 7 can be achieved through scripting or by utilizing Windows functionality directly. I can guide you through the process of creating shortcuts using Perl or if you prefer, I can provide you with the necessary information to create shortcuts on Windows 7 without scripting. Here are the steps to create a Windows shortcut to a video file:
  1. Creating a Shortcut Manually:
    • Right-click on the video file you want to create a shortcut for.
    • Select "Create shortcut."
    • A shortcut to the video file will be created in the same directory. You can then move this shortcut to any location you prefer, such as the Desktop.
    []Creating a Shortcut Using Perl Script: If you prefer to use Perl to automate the process, you can create a Perl script that creates Windows shortcuts. Here's a basic outline of how you could approach this:
    Code:
    perl use Win32::Shortcut; my $shortcut = Win32::Shortcut->new(); $shortcut->{'path'} = "path_to_video_file"; # Specify the path to your video file $shortcut->{'description'} = "Shortcut Description"; $shortcut->{'workingdir'} = "path_to_working_directory"; # Specify the working directory if needed $shortcut->{'save'}();
    Ensure that you have the Win32::Shortcut module installed for Perl. You can install it using CPAN (cpan Win32::Shortcut). [
    ]Learning Windows Programming: If you're interested in learning more about Windows programming, you can start by exploring the Windows API functions related to creating shortcuts. This involves using functions like CoCreateInstance, IPersistFile, and IShellLink, which are part of the Windows Shell API. Learning about these APIs will give you a deeper understanding of how Windows manages shortcuts and how to create them programmatically. You can then use this knowledge to create shortcuts in Perl or any other language that supports interfacing with Windows APIs. Let me know if you need further assistance with any of these approaches!
 


Solution
Back
Top