-1
別々のフォルダにある写真がたくさんありますが、各フォルダもフォルダ内にあります。これは、この固定名のサブフォルダから親フォルダへファイルを移動するにはどうすればよいですか?
<path>\(nameoffolder)\full\
のように見えると私はその親フォルダ(nameoffolder)
にfull
というフォルダ内のすべての画像を移動したいです。
(nameoffolder)
は、連続する数字ではなく、その名前が大きく異なります。
これをバッチで、できればコマンドラインで行う方法はありますか? 、使用するコマンドとその仕組みを理解するための
@echo off
rem For each subdirectory in the specified directory check if there is
rem a subdirectory with name "full" containing 1 or more files. If this
rem condition is true, move the files from subdirectory "full" to its
rem parent directory and then delete the subdirectory "full".
for /D %%F in ("C:\Temp\*") do (
if exist "%%F\full\*" (
echo Moving files to %%F ...
move /Y "%%F\full\*" "%%F" >nul
rd "%%F\full"
)
)
コマンドプロンプトウィンドウを開き、そこに次のコマンドを実行します。
こんにちは。 StackOverflowへようこそ。私たちは喜んでお手伝いします。あなたがこれまでに得たものを私たちに見せてください。そして、それを調整し正しいものにするための提案をします。 http://stackoverflow.com/help/how-to-ask –