| 1. |
Solve : Batch for create a copy of the original file from a shortcut file.? |
|
Answer» Batch for create a copy of the original file from a shortcut file. I have a shortcut file pointing to his original file If its not YOUR file then you are doing this over a network? With a shared path to HIS file which just happens to be a shortcut? Guessing this is a remote system on a network SINCE if you just wanted to make an exact copy of a file you could do it through windows locally. Also guessing that this is not a one time copy since you could simply double-click on the shortcut to navigate to the file and get a copy that way if it was a 1 time copy. If you right-click your shortcut you can select properties, and then view the target path. Then select that target path and use that target path in a batch file such as xcopy shortcut_target_path\file_you_want.* c:\drop_file_here\*.* /s/d/y Replace shortcut_target_path with the target path that you got from your shortcut. If there are any spaces in the path you will need to BIND it with " ". Also if you are using Windows Vista or 7, you will want to use robocopy instead of xcopy with different switches. Trying to push a shortcut.lnk into a batch is just going to be nothing but trouble. If you declare the UNC path directly, you will be better off. http://www.uwplatt.edu/oit/terms/uncpath.html If you run into a UNC path issue, you can always create a mapped drive to the folder location where that file resides such as X: Then use xcopy x:\file_you_want.* c:\drop_file_here\*.* /s/d/y or the robocopy equivilant if Vista or 7 at your end. And you have to bind the origin target path with " " if there are spaces.It's done Dave. In autohotkey. I hope the next time will be more simple. Really I am afraid. Best Regards |
|