Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Generic User Avatar

What code in a batch file would copy the desktop shortcuts into a folder ?


  • Please log in to reply
7 replies to this topic

#1 Bastie

Bastie

  •  Avatar image
  • Members
  • 242 posts
  • OFFLINE
  •  
  • Local time:02:48 PM

Posted 04 April 2024 - 11:12 AM

What code in a batch file would copy the desktop shortcuts into a folder in x32Win10ProV22H2 ?



BC AdBot (Login to Remove)

 


#2 ranchhand_

ranchhand_

  •  Avatar image
  • Members
  • 5,312 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Midwest
  • Local time:10:48 PM

Posted 04 April 2024 - 11:22 AM

I'm not sure what you are aiming for, but any shortcut on your desktop can be drag & dropped into any folder you want in File Explorer (unless you want all shortcuts created to automatically be posted in the folder by default).


If there are no responses to my post for 3 days I remove it from my answer list. If you wish to continue the thread after 3 days please PM me.


#3 Pkshadow

Pkshadow

  •  Avatar image
  • BC Advisor
  • 13,782 posts
  • ONLINE
  •  
  • Gender:Not Telling
  • Location:On the Brow of the Hill, West Coast, Canada
  • Local time:09:48 PM

Posted 04 April 2024 - 04:58 PM

Can try holding Shift Key Down then start clicking your Short Cuts then drag and drop.

 

Putting all Shortcuts into a folder does is make them be forgotten about. Better off Deleting them.

 

Or move them off the Desktop to another drive then make a shortcut to that drive.  Or Make a shortcut to a folder on another driver/partition then make a shortcut on the Desktop

or Quick Launch.


" mosquitoes really wake up everyday and choose violence "   — dalia (@_dalia7)
www.cnn.com/2020/07/23/health/mosquitoes-attraction-humans-future-wellness-scn/index.html

Ticks - Lyme disease & anaplasmosis - https://www.ctvnews.ca/health/what-you-should-know-about-the-tick-borne-disease-anaplasmosis-1.6942217
 

I-7 ASUS ROG Rampage II Extreme  / ASUS TUF Gaming F17 / I-7 4770K ASUS ROG Maximus VI Extreme


#4 Budapest

Budapest

    Bleepin' Cynic


  •  Avatar image
  • Moderator
  • 27,901 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:02:48 PM

Posted 04 April 2024 - 05:07 PM

Have a read of this:

 

https://community.spiceworks.com/t/batch-file-needs-to-create-a-start-menu-folder-and-copy-desktop-shortcuts-to-it/819153


The power of accurate observation is commonly called cynicism by those who haven't got it.

—George Bernard Shaw

#5 Bastie

Bastie
  • Topic Starter

  •  Avatar image
  • Members
  • 242 posts
  • OFFLINE
  •  
  • Local time:02:48 PM

Posted 05 April 2024 - 10:44 PM

Ranchhand - I don't want a method - I want code for a batch file.

 

BC Advisor - ditto.

What is more I do REALLY want to copy shortcuts to a folder and NOT what you suggest.

 

Moderator - thank you for that reference - it is tangentially relevant. My difficulty is different from the one in that thread in so far as I do not want to create a folder or MOVE shortcuts. My difficulty is that I have no 'correct' name for the desktop folder - "copy C:\......\desktop\'.lnk C:\specified folder\" does not work because I lack the information that I have designated as "....\desktop\"

 

Actually - that URL DOES give me the path I am looking for - it is "C:\Users\name\Desktop"

That SHOULD solve my problem - I hope it does.

 

Yippee ! It does !

 

The successful code is :

Copy C:\Users\Name\Desktop\*.lnk "C:\path to destination folder\"


Edited by Bastie, 05 April 2024 - 11:05 PM.


#6 cryptodan

cryptodan

    Bleepin Madman


  •  Avatar image
  • Members
  • 35,210 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:USA
  • Local time:04:48 AM

Posted 05 April 2024 - 11:17 PM

Why are you wanting to copy all shortcuts to a folder?

US Navy Veteran from 2002 to 2006

Masters in Computer and Digital Forensics Expert - Stevenson University Alumni 2015

Arch Desktop - https://termbin.com/epij

Arch Laptop - https://www.termbin.com/dnwk

Ubuntu Server - https://termbin.com/zvra


#7 Budapest

Budapest

    Bleepin' Cynic


  •  Avatar image
  • Moderator
  • 27,901 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:02:48 PM

Posted 05 April 2024 - 11:27 PM

I'm happy you got it sorted :thumbup2:


The power of accurate observation is commonly called cynicism by those who haven't got it.

—George Bernard Shaw

#8 Pkshadow

Pkshadow

  •  Avatar image
  • BC Advisor
  • 13,782 posts
  • ONLINE
  •  
  • Gender:Not Telling
  • Location:On the Brow of the Hill, West Coast, Canada
  • Local time:09:48 PM

Posted 07 April 2024 - 07:03 PM

Insignificant results : Copy C:\Users\Name\Desktop\*.lnk "C:\path to destination folder\"


" mosquitoes really wake up everyday and choose violence "   — dalia (@_dalia7)
www.cnn.com/2020/07/23/health/mosquitoes-attraction-humans-future-wellness-scn/index.html

Ticks - Lyme disease & anaplasmosis - https://www.ctvnews.ca/health/what-you-should-know-about-the-tick-borne-disease-anaplasmosis-1.6942217
 

I-7 ASUS ROG Rampage II Extreme  / ASUS TUF Gaming F17 / I-7 4770K ASUS ROG Maximus VI Extreme





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users