Creating shortcut to a file

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
Anders Larsen
Newbie
Posts: 2
Joined: Fri Apr 16, 2004 6:57 am

Creating shortcut to a file

Post by Anders Larsen » Fri Apr 16, 2004 7:00 am

Hi.

I am wondering if you could make a shortcut to a file in a macro script.

First my script have to check if the file exists, that is no problem.
But if the file exist, then I need the script to create a shourt to the file in another dir. Is this possible?

Lumumba

Post by Lumumba » Mon May 03, 2004 11:12 pm

I guess yes, but I can't remember that its possible with Macro Scheduler. :oops:
Anyone to correct me ?

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Tue May 04, 2004 4:13 am

Hi Anders

Quick and dirty approach: No time for scripts for a while, will just be able to submit quick responses.

1. Check to see if files exists, if NO, then end.
2. If File exists use Windows Find/Search to locate file.
3. Tab/MouseMove to position in Find window, right click/MainMenu-File to do Create shortcut (will have to be on desktop, cannot add to Find results).
4. Once shortcut is made, can move to desired directory.

This should be enough to complete the script that you need. I see this is in Beginner's Forum so you may want to get some others to help with this. You can submit portions if you do it yourself, and I am sure there will be plenty of help available. Just eat the elephant one bite at a time, and you will get it done.
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

User avatar
support
Automation Wizard
Posts: 1450
Joined: Sat Oct 19, 2002 4:38 pm
Location: London
Contact:

Post by support » Tue May 04, 2004 8:25 am

Or use the shortcut.exe tool that comes with the windows tool kit. Or use VBscript and windows scripting host activex
MJT Net Support
[email protected]

Lumumba

Post by Lumumba » Tue May 04, 2004 9:41 pm

Have found something using this keyword in Google: FileCreateShortcut
Maybe that works for you, cause i haven't ever used Shortcut.exe which has been recommended by MJTNET Support - check both out 8)

Lumumba

Post by Lumumba » Thu May 06, 2004 9:16 pm

Here it is. It should work with Macro Schedulers Run Program> command [more...]

User avatar
Bob Hansen
Automation Wizard
Posts: 2475
Joined: Tue Sep 24, 2002 3:47 am
Location: Salem, New Hampshire, US
Contact:

Post by Bob Hansen » Fri May 07, 2004 3:00 am

NICE! :D
Hope this was helpful..................good luck,
Bob
A humble man and PROUD of it!

Post Reply
cron
Sign up to our newsletter for free automation tips, tricks & discounts