Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a folder containing shortcuts that point to files that are located in various directories and drives. I would like to copy the files pointed to (NOT the shortcut files themselves) to a single destination folder.

Is there a way in windows (XP, Vista, 7), file manager, or some utility I can use to do this?

I've heard you can do this with various multi-step custom scripts. However, I've heard rumors there is a one click way to do this without having to fabricate a custom script each time, where regardless where the shortcuts point to, I can select the group of shortcuts and do a copy operation that will grab the files they point to. Then, I can paste or otherwise put the actual files (not shortcuts) into one directory.

It would be very time consuming to manually find each file pointed to by a shortcut and one by one copy them to the target folder.

Note that I've seen this question asked before on the internet but haven't seen a good answer.

share|improve this question
    
use copylinktarget plugin for total commander. –  user111518 Dec 30 '11 at 11:15

5 Answers 5

I think the answer is no because a shortcut is not really a symbolic link in the same way it is in linux. The concept of symbolic link was introduced as part of NTFS 5.0, but they apply to directories, not files. Things may have changed in windows 7, I admit to being clueless there. Shell-shocked has a good article on Windows Symbolic and Hard Links.

It would be cool to be proven wrong on this one, because this is a problem I would love to have a solution to at work!

share|improve this answer
    
Windows .lnk files are similar to Linux .desktop files, aren't they? –  petersohn Apr 16 '10 at 6:50

I've found a very easy method of copying the files shortcuts are pointing to rather than the shortcuts themselves:
Add the selection of shortcuts to ZIP (via the shell extension). Then the original files automatically get zipped and not the shortcuts.
Extracting the content of the ZIP file into a location of your preference gets the job done perfectly and quickly.

share|improve this answer

As an alternative workaround, I found Microsoft Groove very helpful. Files can be dropped into a Groove workspace as a temporary placeholder (like a zip file). Then drag and drop the files from the Groove workspace onto the destination folder in Windows Explorer.

share|improve this answer

It's straightforward in PowerShell.

To copy the target of a Windows shortcut (*.lnk) using PowerShell

(modified from http://windowsitpro.com/powershell/working-shortcuts-windows-powershell)

1) Create the following file (Powershell script):

====== file Get-Shortcut.ps1============

begin

{
    $WshShell = New-Object -ComObject WScript.Shell;
}

process

{
    $WshShell.CreateShortcut($_)
}
====== end file Get-Shortcut.ps1============

2) set execution policy to run scripts

Various ways to do this. One method:

  • Run powershell as administrator

  • Set-ExecutionPolicy bypass

(when done, set it back, e.g. "Set-ExecutionPolicy Default")


3) Run this loop in PowerShell

foreach ($lnk in Get-ChildItem C:\FromDir\\*.lnk -ErrorAction SilentlyContinue | .\Get-Shortcut.ps1)

{

echo $lnk.targetpath 

copy $lnk.targetpath C:\ToDir

}
share|improve this answer

Hold down the [Ctrl] key. Click and drag what you want to copy.

share|improve this answer
    
This does not do what the original question asked for. –  Heptite Aug 3 at 19:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.