2024年4月2日

[CMD] IF EXIST FOLDER check

 if exist "FOLDER\" echo FOLDER exist

if exist "FILE" echo FILE or FOLDER exist

if exist "FOLDER\nul" echo not use

if exist "FILE\." echo also FILE exist

2024年3月27日

[WORD VBA] Paragraphs.Add

 Paragraphs.Add 會將 Paragraphs set 增加一個 paragraph, 但是返回的並不是新增的而是新增之前倒數一個 paragraph.

2024年3月25日

2024年3月13日

將目錄建立在虛擬磁碟機 - Subst

 建立路徑與磁碟機代號之間的關聯。

(all user)

REGEDIT4 

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices] 
"Z:"="\\??\\C:\\Documents and Settings\\All Users\\Shared Documents"

(personal)

SUBST [drive1: [drive2:]path]

SUBST drive1: /D


  drive1:        指定您要指派路徑的虛擬磁碟機。

  [drive2:]path  指定您要指派給虛擬磁碟機的實際

                 磁碟機與路徑。

  /D             刪除取代的 (虛擬) 磁碟機。


鍵入 SUBST 而不加任何參數,即可顯示目前虛擬磁碟機的清單。


2023年10月25日

Restore Classic Windows Right Menu

 reg add "HKCU\software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f /ve

2023年4月11日

win10工作排程器 Registry 位置

 電腦\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree

2022年3月10日

[Perl] How to pass file handle as parameter

 open(FN,$filename) ;

function (*FN) ; #*FN as a file handle pass into sub-routine


2022年3月9日

HTML字符編碼大全

 HTML字符編碼大全

2022年3月3日

ECHO 跳脫字元

 ECHO >          fail

ECHO ^>

>

使用 ^ 可以產生跳脫字元效果。使用在變數中要多一個


remove a folder with "." end

使用檔案全名 \\?\C:\tmp\folder.