![]() |
|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
Gnucleus (Windows) For assistance for users with the Gnucleus program. Important links: Updated Gnucleus 2.2.0.0 Installer! and also Updated Connection Caches for Gnucleus! |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
| |||
![]() You had to ask huh? ;-) Well... I'm sure there's easier ways, but I use this perl script... +++++++++++++++++++++++++++ use Win32::Clipboard; ## remove 2048 bytes from end of file ## my($tval)=2048; ## use filename from clipboard ## my($clp) = Win32::Clipboard(); my($fn) = $clp->Get(); ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size, $atime,$mtime,$ctime,$blksize,$blocks) = lstat($fn); my($nsize)=$size-$tval; print "$fn\n\n"; print "$size->$nsize\n"; open(MFILE,"+<$fn") || die "Can't open file\n"; truncate(MFILE, $nsize) || die "Can't truncate\n"; close(MFILE); +++++++++++++++++++++++++++ It takes the filename from the clipboard and removes $tval bytes from the end (I think the Win32::Clipboard() module was an add-on to perl BTW). |
![]() |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Gnucleus 1.8.3 (And 1.8.4) is out | klumy | Gnucleus (Windows) | 9 | February 18th, 2003 12:51 AM |
Gnucleus 1.7.7 is out | klumy | Gnucleus (Windows) | 4 | May 15th, 2002 03:51 PM |
Gnucleus 1.7.5 is out | klumy | Gnucleus (Windows) | 4 | May 6th, 2002 01:30 PM |
www.gnucleus.net | swabby | Gnucleus (Windows) | 1 | October 11th, 2001 04:47 PM |
Gnucleus 1.4.2.0 | Unregistered | Gnucleus (Windows) | 1 | September 29th, 2001 05:55 PM |