A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows XP » New Users to Windows XP
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Creating shortcut via script



 
 
Thread Tools Display Modes
  #1  
Old October 1st 08, 01:31 AM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
John[_46_]
external usenet poster
 
Posts: 60
Default Creating shortcut via script

Hi

Is there a way to use a batch file or script to do the following;

1. Create a folder X

2. Copy a file form another location to folder X.

3. Create a shortcut to copied file in folder X on the desktop?

If batch or script can not do this, is there another way?

Thanks

Regards




Ads
  #2  
Old October 1st 08, 01:48 AM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
John[_46_]
external usenet poster
 
Posts: 60
Default Creating shortcut via script

Hi

A couple of additions to the last questions.

How can I

a. Add a specific icon (world icon) form the
%SystemRoot%\system32\SHELL32.dll to the created shortcut?

b. Any way to scan all icons on the desktop and if any shortcut already has
the world icon to change it to something else form
%SystemRoot%\system32\SHELL32.dll ?

Many thanks. Sorry for all the questiosn but I am new to this.

Regards

"John" wrote in message
...
Hi

Is there a way to use a batch file or script to do the following;

1. Create a folder X

2. Copy a file form another location to folder X.

3. Create a shortcut to copied file in folder X on the desktop?

If batch or script can not do this, is there another way?

Thanks

Regards






  #3  
Old October 1st 08, 05:54 PM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
Tim Slattery
external usenet poster
 
Posts: 1,340
Default Creating shortcut via script

"John" wrote:

Hi

Is there a way to use a batch file or script to do the following;

1. Create a folder X

2. Copy a file form another location to folder X.


These two are easy of course. mkdir to create a folder, copy to copy a
file into it.

3. Create a shortcut to copied file in folder X on the desktop?


That's hard. A Google search turns up this:
http://www.xxcopy.com/xxcopy38.htm. That page describes XXMKLINK which
they claim will create a shortcut from the command line. There's a
link at the bottom of the page to download the tool, which is free.
All I know about it is what's on that page, I've never used it.

--
Tim Slattery
MS MVP(Shell/User)

http://members.cox.net/slatteryt
  #4  
Old October 2nd 08, 08:58 AM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
ju.c[_2_]
external usenet poster
 
Posts: 1,133
Default Creating shortcut via script

Xxcopy doesn't work with SP3.

Yet.

Is it fixed now?


"Tim Slattery" wrote in message ...
"John" wrote:

Hi

Is there a way to use a batch file or script to do the following;

1. Create a folder X

2. Copy a file form another location to folder X.


These two are easy of course. mkdir to create a folder, copy to copy a
file into it.

3. Create a shortcut to copied file in folder X on the desktop?


That's hard. A Google search turns up this:
http://www.xxcopy.com/xxcopy38.htm. That page describes XXMKLINK which
they claim will create a shortcut from the command line. There's a
link at the bottom of the page to download the tool, which is free.
All I know about it is what's on that page, I've never used it.

--
Tim Slattery
MS MVP(Shell/User)

http://members.cox.net/slatteryt

  #5  
Old October 2nd 08, 10:55 AM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
ju.c[_2_]
external usenet poster
 
Posts: 1,133
Default Creating shortcut via script

Try this:

Shortcut 1.11 24 KB (Freeware)
http://www.optimumx.com/download/#Shortcut

"/
Allows you to create, modify or query Windows shell
links (shortcuts) from the command-line. You can
export the properties of an existing shortcut to a
text file in .INI format. Use 'Shortcut /?' to view
the syntax.
/"


ju.c


"John" wrote in message ...
Hi

Is there a way to use a batch file or script to do the following;

1. Create a folder X

2. Copy a file form another location to folder X.

3. Create a shortcut to copied file in folder X on the desktop?

If batch or script can not do this, is there another way?

Thanks

Regards




  #6  
Old October 2nd 08, 01:54 PM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
Tim Slattery
external usenet poster
 
Posts: 1,340
Default Creating shortcut via script

"ju.c" wrote:

Xxcopy doesn't work with SP3.


Interesting, but I'm not talking about xxcopy. This is a different
program, apparently from the same place, called xxmklink. It doesn't
copy files, it makes a link. I don't see any mention of SP3 on the
page.

--
Tim Slattery
MS MVP(Shell/User)

http://members.cox.net/slatteryt
  #7  
Old October 2nd 08, 01:55 PM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
Tim Slattery
external usenet poster
 
Posts: 1,340
Default Creating shortcut via script

"ju.c" wrote:

Try this:

Shortcut 1.11 24 KB (Freeware)
http://www.optimumx.com/download/#Shortcut

"/
Allows you to create, modify or query Windows shell
links (shortcuts) from the command-line. You can
export the properties of an existing shortcut to a
text file in .INI format. Use 'Shortcut /?' to view
the syntax.


Sounds good!

--
Tim Slattery
MS MVP(Shell/User)

http://members.cox.net/slatteryt
  #8  
Old October 3rd 08, 09:25 AM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
ju.c[_2_]
external usenet poster
 
Posts: 1,133
Default Creating shortcut via script

Oh, I thought xxmklink was an xxcopy command. Doh!


"Tim Slattery" wrote in message ...
"ju.c" wrote:

Xxcopy doesn't work with SP3.


Interesting, but I'm not talking about xxcopy. This is a different
program, apparently from the same place, called xxmklink. It doesn't
copy files, it makes a link. I don't see any mention of SP3 on the
page.

--
Tim Slattery
MS MVP(Shell/User)

http://members.cox.net/slatteryt

  #9  
Old October 3rd 08, 02:28 PM posted to microsoft.public.windowsxp.general,microsoft.public.windowsxp.newusers
ju.c[_2_]
external usenet poster
 
Posts: 1,133
Default Creating shortcut via script

How to to do the following with a batch file:

1. Create a folder.
2. Copy a file to the created folder.
3. Create a shortcut on the desktop pointing to the
file that was copied to the created folder.


1. Download required files:

To create the shortcut:
Shortcut 1.11 24 KB (Freeware)
Info: http://www.optimumx.com/download/#Shortcut
Download: http://www.optimumx.com/download/Shortcut.zip

To launch the batch file without a command window:
Hidden Start 2.1 23 KB (Freeware)
Info: http://www.ntwind.com/software/utilities/hstart.html
Download: http://www.ntwind.com/download/hstart.zip

2. Copy both files to C:\WINDOWS\

3. Copy below and paste into Notepad:

----------copy inside only----------
@ECHO OFF

:: Create a folder:
MD "C:\Path To\New folder\"

:: Copy a file to the created folder:
XCOPY "C:\Path To\file.ext" "C:\Path To\New folder\"

:: Create a shortcut on the desktop:
C:\WINDOWS\Shortcut.exe /F:"%UserProfile%\Desktop\file.lnk" /A:C /T:"C:\Path To\file.ext"

CLS
EXIT

----------copy inside only----------

4. Modify the paths accordingly, then paste into Notepad.

5. Save-as AnyName.bat (any name + .bat)

6. Right-click and select "New-Shortcut"

7. Paste the following into the "Type the location of the item" area:
C:\WINDOWS\HSTART.EXE /NOCONSOLE "C:\Path To\AnyName.bat"

8. Give the shortcut a name and run it to test.


ju.c


"John" wrote in message ...
Hi

Is there a way to use a batch file or script to do the following;

1. Create a folder X

2. Copy a file form another location to folder X.

3. Create a shortcut to copied file in folder X on the desktop?

If batch or script can not do this, is there another way?

Thanks

Regards




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off






All times are GMT +1. The time now is 11:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.