# 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
Using the new WebView2 AllowHostInputProcessing Keyboard Mapping Feature
-
[image: Menu Accelerator Web View Banner]
The WebView2 control is a complex beast and when you're building hybrid
Desktop/Web applications that do seriou...
3 months ago
No comments:
Post a Comment
- the first minus - Comments have to be moderated because of the spammers
- the second minus - I am very lazy at moderating comments ... hardly find time ...
- the third minus - Short links are no good for security ...
- The REAL PLUS : Any critic and positive feedback is better than none, so your comments will be published sooner or later !!!!