1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

GG ACPRでreplayファイルをフォルダ分けするバッチ

Last updated at Posted at 2021-01-23

機能

(以前公開したバージョンに不具合ありました。修正しました。ごめんなさい )

Steam版 Guilty Gear xx Accent Coreで
Network対戦を行ったreplayファイルを日付フォルダに整理するバッチ。

ACPRのメニューからreplayを選ぶと、全て出てきてまともに選択できない。
しかしアプリ的には実フォルダの階層をブラウザする機能が備わっているので、
フォルダ階層を分けしてあげれば、そのように表示できる。
これを自動化するツールを作った。

やること

「コード」に記載したコードをtextファイルに貼り付けて保存。
拡張子を「.cmd」に変更。

実行する。

デスクトップにおいて適当にダブルクリックしてもいいと思うし、
一日一回定期実行するようにしておいてもいいかもね

コード

(直近7日分はcurrentに表示し、それより古いものはarchiveフォルダに移動するように修正)

@echo off
setlocal enabledelayedexpansion

set cur_dir=%~dp0
set dir_path=%HOMEPATH%\Documents\ARC SYSTEM WORKS\GGXXAC\Replays

cd %dir_path%

rem If your location is other than Japan, you should change code that is at after line.
rem Example for US. 'set today=%date:~10,4%%date:~7,2%%date:~4,2%'  
set today=%date:/=%

set archivedir=archive

if not exist %archivedir% (
    mkdir %archivedir%
)

for %%i in (*.ggr) do (
    set filename=%%i
    set stamp=!filename:~0,8!

    if not %today% == !stamp! (
        if not exist !stamp! (
            mkdir !stamp!
        )
        move /Y "!filename!" !stamp!
    )
)

set /a count=0
set /a n=0

for /d %%i in (20*) do (
    set /a count=count+1
)

echo %count%
set /a target=count-7

for /d %%i in (20*) do (
    set /a n=n+1
    if not !n! gtr %target% (
        move /Y %%i %archivedir%
    )
)

cd %cur_dir%

こんな感じ

replay.png

英語版 ( for US location )

thanks Skeletal Minion (@Skeletal_Minion)

1
1
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?