where /R F: "*我不很*.mp3"
也可以用dir達成一樣效果
dir 我不很*.mp3 /S
Where
The Will Will Web | Windows 要如何快速找到特定執行檔的所在目錄 ( which )
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", "http://www.wretch.cc/album/show.php?i=x9079&b=53&f=1188967273&p=1&sp=0", false);
xmlHttp.send(null);
var parser = new DOMParser();
var doc=parser.parseFromString(xmlHttp.responseText,"text/html");
window.open(doc.querySelector("#DisplayImage").src);
// ==UserScript==
// @name f12.wretch.yimg
// @description 顯示原圖、開新分頁
// @author NKid
// @version 2012-06-24
// @include http://www.wretch.cc/album/album.php?id=*&book=*
// ==/UserScript==
GM_registerMenuCommand('f12.wretch.yimg - Setting width of images', settingImgWidth);
var oriTitle=document.title; //原始標題
function getDocFromXHR(url) {
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("GET", url, false);
xmlHttp.send(null);
return new DOMParser().parseFromString(xmlHttp.responseText,"text/html");
}
//Setting width of images
function settingImgWidth() {
var oldIW=GM_getValue('imgwidth')||240; //(Default Value:240)
GM_setValue('imgwidth', prompt('Please Enter the width(px) of images.', oldIW));
}
function APEvent() {
var untreatedImgs=document.querySelectorAll("td.side a img[src*='thumbs/t']"); //尚未處理的圖片
document.title= "AutoPagerize Working";
for(var i=0;i<untreatedImgs.length;i++)
{
untreatedImgs[i].parentNode.target="_blank";
var doc=getDocFromXHR(untreatedImgs[i].parentNode.href);
var paraF=/f=(\d*)&/.exec(untreatedImgs[i].parentNode.href)[1];
if (doc.getElementById("DisplayImage"))
untreatedImgs[i].src=doc.getElementById("DisplayImage").src;
else if (doc.querySelector("img[src*='"+ paraF +"']"))
untreatedImgs[i].src=doc.querySelector("img[src*='"+ paraF +"']").src;
}
document.title=oriTitle;
}
function main() {
var picLinks=document.querySelectorAll("td.side a"); //圖片超連結
var totalImgLength=picLinks.length; //圖片總數
var imgWidth=parseInt(GM_getValue('imgwidth')||240,10) //圖片寬度
GM_addStyle('td.side img{max-width:@imgwidthpx}'.replace('@imgwidth',imgWidth));
for(var i=0;i<picLinks.length;i++)
{
picLinks[i].target="_blank";
var doc=getDocFromXHR(picLinks[i].href);
var paraF=/f=(\d*)&/.exec(picLinks[i].href)[1];
if (doc.getElementById("DisplayImage"))
picLinks[i].children[0].src=doc.getElementById("DisplayImage").src;
else if (doc.querySelector("img[src*='"+ paraF +"']"))
picLinks[i].children[0].src=doc.querySelector("img[src*='"+ paraF +"']").src;
document.title= (i+1) + " / " + totalImgLength;
}
document.title=oriTitle;
window.addEventListener("AutoPagerize_DOMNodeInserted",APEvent,false);
}
main();
// ==UserScript==
// @name EZ Recorder [ExampleSite]
// @description 簡易記錄已讀主題
// @author NKid
// @version 2012-06-22
// @run-at document-end
// @include http://ExampleSite.net*
// ==/UserScript==
GM_addStyle('.GM_recorded {background-color:#00A9D8 !important;}');
GM_registerMenuCommand('EZ Recorder [ExampleSite] - Clear Records ',clearRecord);
var siteName="ExampleSite";
var titleSelector="h2.entry-title a";
function clearRecord() {
if (confirm('Do you want to clear the record?'))
{
window.localStorage.removeItem(siteName);
GM_notification('Clear The Record Of This Site.',null);
}
}
function titleClick(event) {
//記錄主題id並上色
event.preventDefault();
event.target.className="GM_recorded";
localStorage.setItem(siteName,event.target.href);
GM_notification('Recorded.',null);
}
//trigger設定事件
function setTitleClickEvent() {
var titles=document.querySelectorAll(titleSelector);
for(var i=0;i<titles.length;i++)
titles[i].addEventListener('click',titleClick,false);
}
function markThisPage() {
if (localStorage.getItem(siteName) != null)
{
var record=localStorage.getItem(siteName);
var titles=document.querySelectorAll(titleSelector);
for(var i=0;i<titles.length;i++)
if (record ==titles[i].href) titles[i].className="GM_recorded";
}
}
function showRecord() {
prompt("The record of this site.",localStorage.getItem(siteName));
}
setTitleClickEvent();
markThisPage();
[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop
DirectoryInfo dir = new DirectoryInfo("K:\\VGD-103");
FileInfo[] files= dir.GetFiles("*.rar");
Array.Sort(files, (f1, f2) => f1.Length.CompareTo(f2.Length)); //排序檔案大小
foreach (FileInfo f in files)
Console.WriteLine("{0}\t{1}",f.Name,f.Length/1024);