Download - PA053879

BSEK (Backup/copy Software Evaluation Kit)の詳細情報 : Vector ソフトを探す!

-> [Go to the download page] -> [Download Now]

The Latest Snapshot - BSEK

@rem = ('--*-Perl-*--
@echo off
if	exist "%~dp0\perl.exe" "%~dp0\perl.exe" "%~dpn0.bat" %*
if not	exist "%~dp0\perl.exe"	     "perl.exe" "%~dpn0.bat" %*
goto exit ') if 0;

#!/usr/local/bin/perl
#
# File Name: "bpbf.bat" - "BPB" display tool text Filtering wrapper
#
# Copyright: Public Domain Software (NOT TO BE SHAREWARE OR FREEWARE)
#
# Version (??: secondary series; can be revised by somebodies)
# *.*?? by ***	May be revised for something
#
# Version (ps: primary series; reserved for S. )
# 1.0ps by S.	Created for perl4 or later version.
#
# Related Softwares (required):
#
# - perl 5, version 16, subversion 3 (v5.16.3) built for MSWin32-x86-multi-thread (freeware, 32bit) etc.
#   http://www.activestate.com/activeperl/downloads
#   http://downloads.activestate.com/ActivePerl/releases/5.16.3.1603/ActivePerl-5.16.3.1603-MSWin32-x86-296746.msi
#   (used: "perl.exe" and "perl516.dll")
#
# - bpb: displays information about a drive and the BPB on the volume (freeware, 32bit)
#   http://www.vector.co.jp/download/file/winnt/util/fh328130.html
#   http://ftp.vector.co.jp/pack/winnt/util/disk/status/bpb.zip
#   (used: "bpb.exe")

sub which {
	local(@_) = grep(-f "$_\\$_[0]" && ($_ = "$_\\$_[0]"), split(/\\*;/, $ENV{PATH}));
	return $_[0];
}

$_ = 'bpb.exe';
$bpb = $0;
$bpb =~ s/([^\\]*)$/$_/;
$bpb = &which($_) if !-f "$bpb";
die "Can't find \"$_\": $!\a\n" if !-f "$bpb";

#print STDERR "used: \"$0\"\n";
#print STDERR "used: \"$^X\"\n";
#print STDERR "used: \"$bpb\"\n";

$mode = shift(@ARGV) if $ARGV[0] eq '-t';	# option -t: transparent mode
$mode = shift(@ARGV) if $ARGV[0] eq '-f';	# option -f: filtering mode (default)

open(BPB, "\"$bpb\" @ARGV|") || die "Can't open \"$bpb\": $!\a\n";
if ($mode eq '-t') {
	while (<BPB>) {
		print;
	}
} else {
	while (<BPB>) {
#		print if /^Volume:/;
#;;		print if /^StartingOffset:/;
		if (1 & /^(StartingOffset:\s*)(\S+)\s+(\d+)/) {
			$N = $3;
			$U4KB = $N / 4096;	# 4KB
			$U1MB = $N / 2**20;	# 1MB
			$U1GB = $N / 2**30;	# 1GB
			printf("$1$2=${N}B $U4KB/4KB %.3fMB %.3fGB\n", $U1MB, $U1GB);
		}
#;;		print if /^PartitionLength:/;
		if (1 & /^(PartitionLength:\s*)(\S+)\s+(\d+)/) {
			$N = $3;
			$U4KB = $N / 4096;	# 4KB
			$U1MB = $N / 2**20;	# 1MB
			$U1GB = $N / 2**30;	# 1GB
			printf("$1$2=${N}B $U4KB/4KB %.3fMB %.3fGB\n", $U1MB, $U1GB);
		}
#;;		print if /^HiddenSectors:/;
		if (1 & /^(HiddenSectors:\s*)(\S+)\s+(\d+)/) {
			$N = $3;
			$U4KB = $N / 8;		#     8 Sectors = 4KB
			printf("MBR/EPBR $1$2 $N $U4KB/4KB; $2 %% 8 = %u\n", $N % 8);
		}
#		print if /^PartitionNumber:/;
		print if /^PartitionType:/;
#		print if /^BootIndicator:/;
#		print if /^RecognizedPartition:/;
#		print if /^RewritePartition:/;
#		print if /^00h-02h Jump Instruction:/;
#		print if /^03h-0ah OEM ID:/;
#		print if /^BIOS Parameter Block/;
#		print if /^0bh-0ch Bytes Per Sector:/;
#;;		print if /^0dh     Sectors Per Cluster:/;
		if (1 & /^(0dh     Sectors Per Cluster:\s*)(\S+)\s+(\d+)/) {
			$N = $3;
			$U1B  = $N * 512;	# 1/512 Sectors = 1B
			$U1KB = $N / 2;		#     2 Sectors = 1KB
			$U4KB = $N / 8;		#     8 Sectors = 4KB
			printf("$1$2 $N %uB ${U1KB}KB $U4KB/4KB\n", $U1B);
		}
#;;		print if /^0eh-0fh Reserved Sectors:/;
		if (1 & /^(0eh-0fh Reserved Sectors:\s*)(\S+)\s+(\d+)/) {
			$N = $3;
			$U4KB = $N / 8;		#     8 Sectors = 4KB
			printf("$1$2 $N $U4KB/4KB; $2 %% 8 = %u\n", $N % 8);
		}
#;;		print if /^10h     Number of FATs:/;
		if (1 & /^(10h     Number of FATs:\s*)(\S+)\s+(\d+)/) {
			$NOF = $3;
			print;
		}
#		print if /^11h-12h Root Entries:/;
#		print if /^13h-14h Small Sectors:/;
#		print if /^15h     Media Descriptor:/;
#		print if /^16h-17h Sectors Per FAT:/;
#		print if /^18h-19h Sectors Per Track:/;
#		print if /^1ah-1bh Number Of Heads:/;
#;;		print if /^1ch-1fh Hidden Sectors:/;
		if (1 & /^(1ch-1fh Hidden Sectors:\s*)(\S+)\s+(\d+)/) {
			$N = $3;
			$U4KB = $N / 8;		#     8 Sectors = 4KB
			printf("$1$2 $N $U4KB/4KB; $2 %% 8 = %u\n", $N % 8);
		}
#;;		print if /^20h-23h Large Sectors:/;
		if (0 & /^(20h-23h Large Sectors:\s*)(\S+)\s+(\d+)/) {
			$N = $3;
			$U4KB = $N / 8;		#     8 Sectors = 4KB
			$U1MB = $N / 2048;	#  2048 Sectors = 1MB
			$U1GB = $N / 2**21;	# 2**21 Sectors = 1GB
			printf("$1$2 $N $U4KB/4KB %.3fMB %.3fGB\n", $U1MB, $U1GB);
		}
#;;		print if /^24h-27h Sectors Per FAT:/;
		if (1 & /^(24h-27h Sectors Per FAT:\s*)(\S+)/) {
			$N = hex($2);
			$U4KB = $N * $NOF / 8;	#     8 Sectors = 4KB
			printf("$1$2 $N $U4KB/4KB; ($2 * $NOF) %% 8 = %u\n", ($N * $NOF) % 8);
		}
#		print if /^28h-29h Extended Flags:/;
#		print if /^2ah-2bh File System Version:/;
#		print if /^2ch-2fh Root Cluster Number:/;
#		print if /^30h-31h File System Information Sector Number:/;
#		print if /^32h-33h Backup Boot Sector :/;
#		print if /^34h-3fh Reserved:/;
#		print if /^Extended BIOS Parameter Block/;
#		print if /^40h     Physical Drive Number:/;
#		print if /^41h     Reserved:/;
#		print if /^42h     Extended Boot Signature:/;
#		print if /^43h-46h Volume Serial Number:/;
		print if /^47h-51h Volume Label:/;
#		print if /^52h-59h System ID:/;
	}
}
close();

@rem = ('
:exit ') if 0;
/* Copyright: Public Domain (free contents) for the contents in the just above element. */
/* Everyone can copy, revise and distribute/publish the contents in the just above element. */
/* Everyone can copy, paste, save and use the contents in the just above element. */

Links - PA053879

Top Page - PA053879

BSEK (Backup/copy Software Evaluation Kit)

Windows システムをファイルコピー型バックアップする検討内容

"xcpt.bat" - eXtended CoPy Test BATch for Windows7 HP 64bit(x64)

"xcp.bat" - eXtended CoPy BATch for Windows7 HP 64bit(x64)

"xat.bat" - eXtended ATtrib BATch for Windows7 HP 64bit(x64)

"bcde.bat" - Boot Configuration Data Edit BATch for Windows 7 (OEM_SLP) / PE3.x - BCD Builder/Generator

"t2hp.bat" - Text TO xHtml Parts BATch for perl

"dddi.bat" - Device class Drivers DisInstaller / Inactive-Installer BATch for Windows 7 (OEM_SLP) / PE3.x

"bpbf.bat" - "BPB" display tool text Filtering wrapper

The making of the integrated ISO file / bootable CD/DVD/BD

The making of 2048[sct] aligned / 2^n[GB] normalized partitions

Ideal 2TB HDD, 256GB partitions, Optimal alignment

Ideal 2TB HDD, 256GB partitions, with gaps for Cyl. boundary

Ideal 2TB HDD, 128GB partitions, Optimal alignment

Ideal 2TB HDD, 128GB partitions, with gaps for Cyl. boundary

Ideal 2TB HDD, 64GB partitions, Optimal alignment

Ideal 2TB HDD, 64GB partitions, with gaps for Cyl. boundary

I-O DATA HDPC-UT, 64GB partitions, with gaps for Cyl. boundary

Hitachi HTS545050B9A300, 64GB partitions, with gaps for Cyl. boundary

FUJITSU MHT2030AT, 8GB partitions, with gaps for Cyl. boundary

Ideal USB Memory, single partition, Optimal alignment

The making of USB bootable system for Windows 7 (OEM_SLP) / PE3.x

counter