|
Hi Guys,
I recently explored adding Models etc into my Client via the repackindex(1) method from Galkon,
However I was stressed when I couldn't seem to find an easy way to individually GZip the .dat files without it containing .dat in the file name..
Save this code into a powershell file and save it in the folder with your .dat files
Simply Right Click 'Run With Powershell'
Code here:Code:gzip * get-childitem *.gz | foreach { rename-item $_ $_.Name.Replace(".dat", "") }
Now this presumes of course that you're using Windows and have GZip (Link) installed. You also need to add C:\Program Files (x86)\GnuWin32\bin to your 'Path' environmental variable
Thanks
what about the ren command from windows?
i misread the OP lol, for gzipping ren won't work. it will work for the other way round once gzipped files are extracted though
not a bad way of doing it no, fair play to you
Are you actually without sarcasm telling me this? I'm a sysadmin so I do know that, obviously. I'm just saying Powershell is more efficient and easier to do advanced commands. to do this in CMD would take a longer time and more 'script'.
I was simply appreciating OP's input, while the first reply was useless.
You have to acknowledge the fact that you are in-fact s sysadmin, the typical user may find it easier to launch a simple bat file rather then powershell, most people would understand how to launch a powershell basec script after one try, however most people here can't get code handed too them to work..
you're a sysadmin that doesn't know that the ren command is barely one line of code to change the extensions of an entire folder.... and when setup takes less then 15 seconds. that's hilarious...
but to correct myself, ren won't do this properly as gzipping is a different subject, not sure why I mentioned it as it's not the right way to do it but I clearly misunderstood the OP. you on the other hand.. you're a dumbass.Code:ren * *.gzip
I am the dumbass, ofcourse. He's sharing this because he knew that people may need this. Y'all replying with useless statements and now I am the dumbass for saying Powershell is more efficient and in this case the best way.
Have a good one sir, i never ment any harm. No idea why you do.
Kind regards,
Dumbass
Fair enough, sir.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
Tags for this Thread |