# START ::: file : /mnt/c/Temp/bin/copyq.cmd @echo off "C:\Temp\bin\copyq\copyq-9.1.0\copyq.exe" %* # STOP ::: file : /mnt/c/Temp/bin/copyq.cmd # START ::: file : /mnt/c/Temp/bin/to-nix.cmd @echo off setlocal :: Step 1: Get clipboard content and store it in the 'path' variable using CopyQ for /f "tokens=*" %%p in ('C:\Temp\bin\copyq.cmd clipboard') do set "path=%%p" :: Step 2: Run the command and store output in 'convertedPath' variable using absolute path for perl for /f "tokens=*" %%a in ('echo %path% ^| C:\Strawberry\perl\bin\perl.exe -ne "$_ =~ s|^([A-Za-z]):|'/mnt/'.lc($1)|e; $_ =~ s|\\|/|g; print;"') do set "convertedPath=%%a" :: Step 3: Copy the converted path to clipboard using CopyQ with absolute path C:\Temp\bin\copyq.cmd copy "%convertedPath%" endlocal # STOP ::: file : /mnt/c/Temp/bin/to-nix.cmd # START ::: file : /mnt/c/Temp/bin/to-win.cmd @echo off setlocal :: Verify PATH for debugging purposes :: echo %PATH% :: pause :: Step 1: Get clipboard content and store it in the 'path' variable using CopyQ for /f "tokens=*" %%p in ('C:\Temp\bin\copyq.cmd clipboard') do set "path=%%p" :: echo Original path from clipboard: %path% :: pause :: Step 2: Run the command and store output in 'convertedPath' variable using absolute path for perl for /f "tokens=*" %%a in ('echo %path% ^| C:\Strawberry\perl\bin\perl.exe -ne "$_ =~ s|^/mnt/([a-z])/|uc($1) . ':/'|e; $_ =~ s|/|\\\\|g; print;"') do set "convertedPath=%%a" :: Display the converted path :: echo Converted path: %convertedPath% :: pause :: Step 3: Copy the converted path to clipboard using CopyQ with absolute path C:\Temp\bin\copyq.cmd copy "%convertedPath%" :: echo Converted path copied to clipboard. :: pause endlocal # STOP ::: file : /mnt/c/Temp/bin/to-win.cmd
Getting the Current TabItem when the Tab is not selected in WPF
-
[image: Banner]
This is a quick reminder to self on how to retrieve a TabItem from a WPF
TabControl *when the tab is not currently selected* because I ru...
1 month ago