湖边的白杨树

探索是一种乐趣

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
  218 随笔 :: 1 文章 :: 14 评论 :: 59万 阅读
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  Scripts

PowerShell
摘要:如上 将指定目录下的所有的文件名从 old 改成 new.. adding -WhatIf at the end of the command we are saying to PowerShell: 'Just test, don't actually make any permanent cha 阅读全文
posted @ 2018-05-23 11:12 fdyang 阅读(11281) 评论(1) 推荐(1) 编辑

摘要:http://powershell.com/cs/blogs/ebookv2/archive/2012/03/23/chapter-16-managing-windows-registry.aspx 阅读全文
posted @ 2014-04-18 14:04 fdyang 阅读(173) 评论(0) 推荐(0) 编辑

摘要:@echo offfor /l %%i in (1,1,5) do ( tasklist /fi "imagename eq sysprep.exe" | find /i "sysprep.exe" if not errorlevel 1 ( taskkill /F /IM "sysprep.exe" if errorlevel 0 goto :NEXT ) echo Retry to terminate sysprep process... %%i if %%i EQU 5 goto :SHUTDOWN ping 1... 阅读全文
posted @ 2013-03-26 19:59 fdyang 阅读(1774) 评论(0) 推荐(0) 编辑

摘要:(PowerShell) 文件操作Get current ps1 file's parent path$x = Split-Path -Parent $MyInvocation.MyCommand.DefinitionCreate a folder if it does not exist.$myNewFolder = $x +"myTestFolder\"if(!(Test-Path $myNewFolder)){new-item -path $x -name myTestFolder -type directory}Open a XML file , and g 阅读全文
posted @ 2013-02-02 22:47 fdyang 阅读(5127) 评论(0) 推荐(0) 编辑

摘要:1.FW要升级,需要修改相关XAML中的所有旧版本到新版本。通过PowerShell 可以非常方便的找到所有的相关文件。#查找本目录中下所有的xaml文件中的 ”1.0.101“ 字符串 select-string 1.0.101 *.xaml 2. 查找指定目录下所有CS文件中的特定的字符串# D:\MyProject\ 指定要递归遍历查找的目录# *.cs 要查找的文件# myString 要查找的字符串$fileList = Get-ChildItem “D:\MyProject\" -recurse *.cs | %{$_.FullName}Foreach($file in 阅读全文
posted @ 2013-01-29 22:20 fdyang 阅读(14423) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示