91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

win7 當前目錄創建快捷方式

發布時間:2020-07-22 22:25:02 來源:網絡 閱讀:1023 作者:muyuluo 欄目:系統運維

注:bat腳本使用ANSI編碼


  1. 第一種

@ echo off

cd /d %~dp0

set onepath=%cd%

echo -----------------create file and cat----------------------------

for /l %%i in (1 1 10) do echo "this is test for test-%%i" >>testfile.txt

type testfile.txt

tree

echo -----------------create file link----------------------------------

set sourcefile=%onepath%\testfile.txt

echo [InternetShortcut] >>testfile.url  

echo URL="%sourcefile%" >>testfile.url

echo IconIndex=0 >> testfile.url

echo IconFile="%onepath%\testfile.txt%" >>testfile.url

echo %errorlevel%

pause

2.第二種

@ echo off

color 0a

set onepath=%cd%

echo -----------------create file and cat----------------------------

for /l %%i in (1 1 10) do echo "this is test for test-%%i" >>testfile.txt

type testfile.txt

tree

echo -----------------create file link----------------------------------


::設置程序或文件的完整路徑(必選)

set sourcefile=%onepath%\testfile.txt

 

::設置快捷方式名稱(必選)

set LnkName=testfile

 

::設置程序的工作路徑,一般為程序主目錄,此項若留空,腳本將自行分析路徑

::set WorkDir=

 

::設置快捷方式顯示的說明(可選)

set Desc=測試

 


(echo Set WshShell=CreateObject("WScript.Shell"^)

echo strDesKtop=WshShell.SpecialFolders("%onepath%"^)

echo Set oShellLink=WshShell.CreateShortcut("%onepath%" ^&"\%LnkName%.lnk"^)

echo oShellLink.TargetPath="%sourcefile%"

echo oShellLink.WorkingDirectory="%onepath%"

echo oShellLink.WindowStyle=1

echo oShellLink.Description="%Desc%"

echo oShellLink.Save)>makelnk.vbs


makelnk.vbs

del /f /q makelnk.vbs

::exit

if %errorlevel%==0 (

    echo create file link success!

)

echo ---------------------------------------create dir link-------------------------------


tree %onepath%


pause

3. 舉例文件與文件夾均創建快捷方式

@ echo off

title bat to dir or file test

color 0a

cd /d %~dp0

set onepath=%cd%

echo -----------------------date:%date%-----------------------------

echo %date% >> testfile.txt

echo -----------------------time:%time%-----------------------------

echo %time% >> testfile.txt

echo -----------------create file and cat----------------------------

for /l %%i in (1 1 10) do echo "this is test for test-%%i" >>testfile.txt

type testfile.txt


echo -----------------create dir testdir----------------------------------

md testdir 

tree

echo ------------------move testfile to testdir--------------------------

move testfile.txt %onepath%\testdir

echo ------------------rename testdir testdir1------------------------

move testdir testdir1

echo -------------------cd testdir1----------------------------------

cd %onepath%\testdir1

echo ------------------rename testfile.txt testfile1.txt------------------

move testfile.txt testfile1.txt

echo -------------------copy testfile1.txt testfile1.bak------------------

copy testfile1.txt testfile.bak

echo --------------------move testdir1/testfile1.txt to %onepath%--------

move testfile1.txt %onepath%

echo ------------------cd %onepath%-----------------------------

cd %onepath%

echo ------------------list %onepath%---------------------------

tree %onepath%

echo -------------------create link--------------------------------------

::set var delay

setlocal EnableDelayedExpansion


for %%a in (testfile1.txt testdir1) do (

    echo "star create link"

(echo Set WshShell=CreateObject("WScript.Shell"^)

    echo strDesKtop=WshShell.SpecialFolders("%onepath%"^)

    echo Set oShellLink=WshShell.CreateShortcut("%onepath%" ^&"\%%a-test.lnk"^)

    echo oShellLink.TargetPath="%onepath%\%%a"

    echo oShellLink.WorkingDirectory="%onepath%"

    echo oShellLink.WindowStyle=1

echo oShellLink.Save)>makelnk.vbs

    makelnk.vbs

if %errorlevel%==0 (

        echo "create  %%a link success!"

    )

::type makelnk.vbs

del /f /q makelnk.vbs


)

if %errorlevel%==0 (

    echo "create  all link success!"

)


echo -------------list %onepath% structure---------

tree %onepath%

echo -------------dir %onepath%---------

dir %onepath%

pause


向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

城口县| 东乌珠穆沁旗| 兴隆县| 平湖市| 通州市| 明光市| 盖州市| 西城区| 宁明县| 南康市| 陵水| 昂仁县| 漯河市| 塘沽区| 资阳市| 凌源市| 博爱县| 咸阳市| 赞皇县| 获嘉县| 大邑县| 安康市| 门源| 阿瓦提县| 平舆县| 闽侯县| 称多县| 姜堰市| 同江市| 平湖市| 育儿| 花莲市| 巴塘县| 无棣县| 建平县| 墨竹工卡县| 山西省| 安塞县| 金寨县| 新民市| 高州市|