デスクトップ上で.htaccessが作成できない

デスクトップ上で.htaccessが作成できない

.始まりんのファイルが、Windows上で作れない場合がある。

1,下記のソースコードをテキストに保存。
2、[htaccess.vbs]などの名前をつけて保存。
3、ファイルをダブルクリックすることで、.htaccessがデスクトップ上に作成できる。

Option Explicit
Dim objShl, objFile, objFolder, objText
Set objShl = WScript.CreateObject("WScript.Shell")
Set objFile = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFile.GetFolder(objShl.SpecialFolders("Desktop"))
Set objText = objFolder.CreateTextFile(".htaccess", False)
objText.Close

参考サイト

かるた無病息災
Windows上で.htaccessファイルを作成する
http://www.karuta.org/wp/2006/11/06/post_762/