How to generate a manifest file like this ?

antiNT

:)
OP
Member
Joined
Sep 14, 2015
Messages
621
Trophies
0
Location
Doha - Qatar
XP
2,839
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
  • AncientBoi @ AncientBoi:
    :rofl2::tpi::rofl2: I meant his eyes :tpi::rofl2::tpi:
  • ZeroT21 @ ZeroT21:
    :toot:blow me then @K3Nv2
  • K3Nv2 @ K3Nv2:
    Nah I'm straight but you're more than welcome to blow ancientboi
  • ZeroT21 @ ZeroT21:
    LOL, which straight person does not make gay jokes?
    +1
  • K3Nv2 @ K3Nv2:
    I'm straight but we can whack dicks together
  • ZeroT21 @ ZeroT21:
    nah, I'm gud over here, no need for sword fights

    :glare:
    +1
  • K3Nv2 @ K3Nv2:
    Dick slang
  • K3Nv2 @ K3Nv2:
    See ancientboi already has a crush on you
  • AncientBoi @ AncientBoi:
    [brings my ⚔️ ] On Guard :D:evil::wub:
  • K3Nv2 @ K3Nv2:
    Looks more like a dagger to me
  • AncientBoi @ AncientBoi:
    Pffffft I have a crush on everybody
  • ZeroT21 @ ZeroT21:
    I see no problem, unless i happen to grow another gender one day. Too bad it ain't now
  • K3Nv2 @ K3Nv2:
    Thought you already had both hotswappable gender fluid
  • ZeroT21 @ ZeroT21:
    Enjoy whatever life chucks your way

    :teach:
    +1
  • K3Nv2 @ K3Nv2:
    Deeze nuts
  • AncientBoi @ AncientBoi:
    Dem Nutz
  • ZeroT21 @ ZeroT21:
    'Em nutters
  • AncientBoi @ AncientBoi:
    M&M nutz
    +1
  • K3Nv2 @ K3Nv2:
    Slim anus nutter
  • AncientBoi @ AncientBoi:
    :unsure::unsure::unsure: I might go buy them M&M w/nuts. I gotta go out to pay the rent anyway
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Eat a Snickers!
  • Psionic Roshambo @ Psionic Roshambo:
    Almond Joys got nuts!
    Psionic Roshambo @ Psionic Roshambo: Almond Joys got nuts!