Skip to content

Instantly share code, notes, and snippets.

@gologius
Last active April 10, 2018 14:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gologius/9e8a07dc622296aa162d275903efc825 to your computer and use it in GitHub Desktop.
Save gologius/9e8a07dc622296aa162d275903efc825 to your computer and use it in GitHub Desktop.
ファイルのみをカレントディレクトリに移動するバッチ。多階層のフォルダが大量にあり、ファイルだけとりあえず一括で欲しい時に
@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