How to generate a manifest file like this ?

antiNT

:)
OP
Member
Joined
Sep 14, 2015
Messages
622
Trophies
0
Location
Doha - Qatar
XP
2,862
Country
Qatar
Hello,
I can't figure out how to generate a manifest file with the following structure : file path: md5 hash: file size (in bytes).
I want to have a txt file who looks like this:
Code:
\ArtOfSword.exe:A3706D489D28D51D8D31A469E36B16BD:159232
\ArtOfSword\ArtOfSword.uproject:D4159C36ECD291B911BDE5662426443E:367
\ArtOfSword\AssetRegistry.bin:07C4B466A707B21363158F10EC59185E:2234259
\ArtOfSword\CookedIniVersion.txt:4193F60033DA1B212101EC44F8F51EFB:1060868
\ArtOfSword\Binaries\Win64\ArtOfSword-Win64-Shipping.exe:1613E07934BE9212BC3A3B2230C2B240:48417280
\ArtOfSword\Config\DefaultEditor.ini:2441CE924D91D6479197CC615B7F213A:29919
\ArtOfSword\Config\DefaultEditorPerProjectUserSettings.ini:F025A5F542DB294F479CF2E3B9ACB15E:73
\ArtOfSword\Config\DefaultEngine.ini:EC738FB227EE884D4C0593E92F43AE55:19907
If you know how to do this please tell me, thanks.
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,077
Country
United States
Shame you're not doing this on Linux, or some other UNIX system. It's super easy there.
while read x; do

size=${x% *}
file=${x#* }
sum="$(md5sum $file 2>/dev/null)"
sum=${sum%% *} #strip off filename to get sum only*

echo "$sum $file $size"

done <<<"$(find . -type f -printf "%s %p\n")"

Save this as a script, chmod it to make it executable, and run it on whatever directory you want like so.
script.sh /path/to/directory >> whatever.txt

Might work with Cygwin, but I don't have a Windows install to test on.
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,077
Country
United States
Bash is easier, and more efficient, than batch, and should actually be able to be ran natively on Windows 10 provided Microsoft's Bash implementation isn't piss poor.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • No one is chatting at the moment.
  • Xdqwerty @ Xdqwerty:
    sigh
  • Xdqwerty @ Xdqwerty:
    @a_username_that_isnt_cool, could you change your username?
  • Xdqwerty @ Xdqwerty:
    i guess not...
  • Xdqwerty @ Xdqwerty:
    yawn
  • Xdqwerty @ Xdqwerty:
    anybody here?
  • P @ PKNate:
    nope
  • BakerMan @ BakerMan:
    fun fact: 7 years by lukas graham, supermassive black hole by muse, and megalomania all have the same bpm
  • BakerMan @ BakerMan:
    girls just wanna have fun and renai circulation also share the same tempo as the few i said before
  • Xdqwerty @ Xdqwerty:
    @BakerMan, megalomania the live a live song?
  • BakerMan @ BakerMan:
    wait no, megalovania*
  • BakerMan @ BakerMan:
    my bad
  • K3Nv2 @ K3Nv2:
    I don't forgive you
  • BigOnYa @ BigOnYa:
    The nerve of that guy, gosh.
  • K3Nv2 @ K3Nv2:
    Yeah expecting me to forgive gtfo
  • Psionic Roshambo @ Psionic Roshambo:
    But how could the Dr have known you didn't want to be circumcized?
  • K3Nv2 @ K3Nv2:
    He didn't you just wanted your dick to be fondled
    +1
  • K3Nv2 @ K3Nv2:
    Watching dune 2 it's eh
  • Psionic Roshambo @ Psionic Roshambo:
    Dune one sucked
  • Psionic Roshambo @ Psionic Roshambo:
    The original with Patrick Stewart was Great
  • K3Nv2 @ K3Nv2:
    A sexual psycopath that love pain where have I heard that before
  • BigOnYa @ BigOnYa:
    In your high school diary?
  • K3Nv2 @ K3Nv2:
    No but your wife let's me read her diary the word psychopath comes up more than sexual
    +1
    K3Nv2 @ K3Nv2: No but your wife let's me read her diary the word psychopath comes up more than sexual +1