【.cmd】 バッチファイルスクリプト %15 【.bat】 (773レス)
【.cmd】 バッチファイルスクリプト %15 【.bat】 http://mevius.5ch.net/test/read.cgi/tech/1663153441/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
5: デフォルトの名無しさん [] 2022/09/16(金) 00:42:16.15 ID:9kvq1ahn >>4 ありがとうございます! 神! http://mevius.5ch.net/test/read.cgi/tech/1663153441/5
222: デフォルトの名無しさん [sage] 2023/03/09(木) 19:15:35.15 ID:eHaHoipW 外部コマンドで置換できるツールがフォーカスを奪う仕様で操作できなくなるから VMで実行したら数時間たっても終わらなくて 別の方法を探したらこれに至った 専用ソフトが見つかり無事終わった http://mevius.5ch.net/test/read.cgi/tech/1663153441/222
274: デフォルトの名無しさん [sage] 2023/05/07(日) 01:38:48.15 ID:OzRuG3KU > measure結果のMaximumの値を取得してるってこと? そう。「集計プロパティ」とか「計算プロパティ」とかっていう構文。 learn.microsoft.com/ja-jp/powershell/module/microsoft.powershell.core/about/about_calculated_properties?view=powershell-5.1#select-object > %はForEach? > ?はWhere? そう。 ForEach-Object {} = % {} = foreach {} ≠ foreach () {} Where-Object {} = ? {} = where {} ≠ where () {} こうも書ける。 powershell -c "(gc 〜.txt -Raw | ConvertFrom-Json) | group characterID | foreach {$_.Group | sort Level | select -Last 1} | ConvertTo-Json" http://mevius.5ch.net/test/read.cgi/tech/1663153441/274
301: デフォルトの名無しさん [sage] 2023/05/30(火) 09:59:41.15 ID:flkBlmPK >>300 ありがとう 古すぎたんだ、取り替えよう http://mevius.5ch.net/test/read.cgi/tech/1663153441/301
340: デフォルトの名無しさん [sage] 2023/06/29(木) 23:50:20.15 ID:v2Nfxu0l >>338 プログラムを実行したファイルを削除する。 http://mevius.5ch.net/test/read.cgi/tech/1663153441/340
365: デフォルトの名無しさん [sage] 2023/07/05(水) 06:55:43.15 ID:Ig34wRo0 @echo off setlocal enabledelayedexpansion set dispskip=0 set update=update.txt set ichiji=temp.txt set ignore=%update% %ichiji% %~nx0 set /A num=last=0 if exist %update% ( sort /R %update% > %ichiji% set /P line=< %ichiji% echo 前回更新日時 !line! set /A sec=160-1!time:~6,2! if "!line:~,16!"=="!date! !time:~,5!" if sec gtr 2 echo 更新が早すぎます !sec! 秒お待ちください :loop if "!line:~11,5!"=="!time:~,5!" goto loop set last=!line:~,4!!line:~5,2!!line:~8,2!.!line:~11,2!!line:~14,2! if "!last:~9,1!"==" " set last=!last:~,9!0!last:~10! ) else echo 初回更新です dir /A-D /OD | findstr /R "^20[0-9][0-9]" | findstr /V "%ignore%" > %ichiji% for /F "delims=" %%f in (%ichiji%) do ( set line=%%f set fname=!line:~36! set ftime=!line:~,4!!line:~5,2!!line:~8,2!.!line:~12,2!!line:~15,2! if !last! lss !ftime! ( echo [処理中] !fname! (処理をこの後に入れる) set /A num+=1 ) else if %dispskip% neq 0 echo スキップ !fname! ) if !num! neq 0 ( echo !date! !time:~,5! >> %update% echo !num! のファイルを更新し %update% に更新日時を追記しました ) else echo 更新ファイルはありません http://mevius.5ch.net/test/read.cgi/tech/1663153441/365
396: デフォルトの名無しさん [sage] 2023/07/07(金) 18:42:51.15 ID:KFogdpBJ >>394 確かにマゾにピッタリだよ、バッチ http://mevius.5ch.net/test/read.cgi/tech/1663153441/396
409: デフォルトの名無しさん [sage] 2023/07/24(月) 23:51:25.15 ID:wZUfbAlM WMI(CIM)が楽かな。 powershellでもVBScriptでもwmicでもお好きなもので。 PowerShell版: $enabledCd = 0 $disabledCd = 22 $methodName = $null $device = Get-CimInstance -Query 'select * from Win32_PnpEntity where Name = "Fax"' if ($device.Status -eq 'OK' -and $device.ConfigManagerErrorCode -eq $enabledCd) { $methodName = 'Disable' } elseif ($device.Status -eq 'Error' -and $device.ConfigManagerErrorCode -eq $disabledCd) { $methodName = 'Enable' } if (! [string]::IsNullOrEmpty($methodName)) { $result = Invoke-CimMethod -InputObject $device -MethodName $methodName $result } ワンライナー版: powershell -c "$d=gcim -cl Win32_PnpEntity -f 'Name=''Fax'''; $s,$c=$d.Status,$d.ConfigManagerErrorCode; if($n=if($s -eq 'OK' -and $c -eq 0){'Disable'}elseif($s -eq 'Error' -and $c -eq 22){'Enable'}){$d|icim -m $n}" http://mevius.5ch.net/test/read.cgi/tech/1663153441/409
534: デフォルトの名無しさん [sage] 2024/06/13(木) 00:35:39.15 ID:V4k66q9W >>533 ファイル名の変名の一例として foo.txt → foo_yyyymmdd-hhmm.txt にするなら for /f "tokens=*" %%i in ("foo.txt") do set d=%%~ti set dd=%d:~0,13%%d:~-2% set dd=%dd:/=% set dd=%dd: =_% for /f "tokens=*" %%i in ("foo.txt") do echo %%~ni_%dd%%%~xi http://mevius.5ch.net/test/read.cgi/tech/1663153441/534
553: デフォルトの名無しさん [] 2024/06/17(月) 23:01:56.15 ID:4L+665Jw CUIをGUIの言葉で言うのは斬新すぎる http://mevius.5ch.net/test/read.cgi/tech/1663153441/553
695: デフォルトの名無しさん [sage] 2025/04/19(土) 11:32:28.15 ID:1418i819 >>692 引数の解釈で分離するから無理 参考までに set str=aaa "dd d" echo echo1 %str% echo echo2 "%str%" call :callecho str call :callecho "%%%%str%%%%" goto :EOF :callecho echo echo3 %1 call echo echo4 %%%1%% echo echo5 %1 call echo echo6 %1 http://mevius.5ch.net/test/read.cgi/tech/1663153441/695
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.034s