Last active
April 10, 2018 14:50
-
-
Save gologius/9e8a07dc622296aa162d275903efc825 to your computer and use it in GitHub Desktop.
ファイルのみをカレントディレクトリに移動するバッチ。多階層のフォルダが大量にあり、ファイルだけとりあえず一括で欲しい時に
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem 【ファイルを移動】 | |
rem /P xxxxx パス名指定 | |
rem /S サブディレクトリに対しても処理を行う | |
rem /C コマンド実行 | |
rem @path forfilesで取得したファイル名(絶対パス) | |
@echo on | |
set curpath=%~dp0 | |
forfiles /S /C "cmd /c if @isDir==FALSE move @path %curpath%" | |
pause |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment