Advertisement
Guest User

mymai_split.bat

a guest
Nov 3rd, 2016
1,472
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.54 KB | None | 0 0
  1. @echo off
  2. rem Mai Dump Split Tool
  3. rem
  4. rem File Name (important): mymai_split.bat
  5. rem
  6. rem PURPOSE:
  7. rem Splits mai dump folder into ZIP with small files (less than 10MB by default) and folder with big files for more efficient transfer.
  8. rem
  9. rem REQUIREMENTS:
  10. rem GNU sed for Windows, Microsoft's forfiles.exe, WinRAR
  11. rem Should be all installed and added to PATH environment variable.
  12. rem
  13. rem USAGE:
  14. rem 1. Make empty folder.
  15. rem 2. Put inside mai dump folder (like this PCSG00756) and mymai_split.bat (this file). Nothing else shoud be inside the folder.
  16. rem 3. Run mymai_split.bat and when it's done you'll get ZIP with small files and folder with big files.
  17. rem 4. Transfer them both to Vita's ux0:mai folder.
  18. rem 5. Extract ZIP right there with VitaShell and delete now useless ZIP.
  19. rem 6. Install game with MaiDumpTool as usual.
  20. rem 7. Done.
  21. rem
  22. rem NOTE:
  23. rem Tested on Windows XP and Windows 7.
  24. rem Therefore can't guarantee correct operation under other OSes.
  25. rem
  26.  
  27.  
  28. echo Scanning files...
  29. forfiles.exe /S /C "cmd /c if @fsize lss 10485760 (if @isdir equ FALSE (echo @relpath))" > mymai_list_of_files.txt
  30.  
  31. echo Formatting list...
  32. ver | find "Windows XP" > nul
  33. if %ERRORLEVEL% EQU 0 (
  34. sed -i "s/^./&\./" "mymai_list_of_files.txt"
  35. )
  36. sed -i "/mymai_list_of_files\.txt/d" "mymai_list_of_files.txt"
  37. sed -i "/mymai_split\.bat/d" "mymai_list_of_files.txt"
  38.  
  39. echo Archiving...
  40. winrar.exe a -afzip -df -ag -t small-files @mymai_list_of_files.txt
  41.  
  42. echo Cleaning up...
  43. del sed*
  44. del mymai_list_of_files.txt
  45.  
  46. echo All Done.
  47. pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement