• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Windows batch scripting question

benwood

Member
I need some help with Windows scripting. I have a bunch of DVDs rips stored on my PC that I watch with my Patriot Box Office (PBO) hardware media player. Unfortunately the PBO doesn't support symbolic links properly so I've had to create directory junctions instead. I've been typing the directory junctions in manually from the command line but surely there's a way to automate this with a batch script. Here's a example:


mklink /J "F:\Movies\Horror\Alien Series\Alien" "F:\Movies\SciFi\Alien Series\Alien"
mklink /J "F:\Movies\Horror\Alien Series\Aliens" "F:\Movies\SciFi\Alien Series\Aliens"
mklink /J "F:\Movies\Horror\Alien Series\Alien 3" "F:\Movies\SciFi\Alien Series\Alien 3"
mklink /J "F:\Movies\Horror\Alien Series\Alien Resurrection" "F:\Movies\SciFi\Alien Series\Alien Resurrection"
 
This would be easy with Powershell basically a for loop that basically looks like this:

$dirList = get-childitem -path "DirPath" | ?{ $_.PSIsContainer }

foreach($dir in $dirList)
{
mklink /J ($dir.FullName) "destinationPath"
}

That is mostly psuedo code, fix it to make it work
 
Back
Top