Quantcast
Channel: PowerShell
Viewing all articles
Browse latest Browse all 15370

Creating links for all files in a directory with PowerShell

$
0
0

Greetings! I am %99 new to powershell and am trying to put together a script to help with some document deployment tasks. I am %100 sure i am doing something wrong, please be gentle :)

In a nutshell I want to create shortcuts for each document found in a directory. The shortcuts are ultimately getting used to pin documents to the metro interface in W8.

Here is what i have so far:

Powershell
#Setting Variables$LocalPath="C:\PDF"$ContentSync="C:\ContentSyncFolder"#Test if the PDF Directory exists and create it if needed.If(!(Test-Path-path$LocalPath)){New-Item$LocalPath-ItemTypeDirectory}else{Write-Host"Directory Already Exists"}#Copy contents from the ContentSync folder into destination folders.Copy-Item$ContentSync\*-Destination$LocalPath-recurse#Loop through files in directoryGet-ChildItem$LocalPathForeach-Object{...

Viewing all articles
Browse latest Browse all 15370

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>