Download - PA053879

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

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

The Latest Snapshot - BSEK

	@echo off
	goto begin

::-----------------------------------------------------------------------------
:: File Name: "xat.bat" - eXtended ATtrib BATch for Windows7 HP 64bit(x64)
::
:: - To display File Attributes and (n)NumberOfLinks etc.
::   File Attributes (Windows)
::   http://msdn.microsoft.com/en-us/library/ee332330.aspx
::   BY_HANDLE_FILE_INFORMATION Structure (Windows)
::   http://msdn.microsoft.com/en-us/library/aa363788.aspx
::   FILE_INFO_BY_HANDLE_CLASS Enumeration (Windows)
::   http://msdn.microsoft.com/en-us/library/aa364228.aspx
::
:: - Attribute characters of Windows7 Explorer (with MJL extension)
::   (that should be used for Filers, Archivers and Backup/Copy Softwares)
::	0x00000001 FILE_ATTRIBUTE_READONLY		R: READONLY
::	0x00000002 FILE_ATTRIBUTE_HIDDEN		H: HIDDEN
::	0x00000004 FILE_ATTRIBUTE_SYSTEM		S: SYSTEM
::	0x00000010 FILE_ATTRIBUTE_DIRECTORY		D: DIRECTORY
::	0x00000020 FILE_ATTRIBUTE_ARCHIVE		A: ARCHIVE
::	0x00000040 FILE_ATTRIBUTE_DEVICE		?: DEVICE (reserved)
::	0x00000080 FILE_ATTRIBUTE_NORMAL		N: NORMAL
::	0x00000100 FILE_ATTRIBUTE_TEMPORARY		T: TEMPORARY
::	0x00000200 FILE_ATTRIBUTE_SPARSE_FILE		P: SPARSE FILE
::	0x00000400 FILE_ATTRIBUTE_REPARSE_POINT		M: Volume Mount Point
::	0x00000400 FILE_ATTRIBUTE_REPARSE_POINT		J: Junction Point
::	0x00000400 FILE_ATTRIBUTE_REPARSE_POINT		L: Symbolic Link (only)
::	0x00000400 FILE_ATTRIBUTE_REPARSE_POINT		?: REPARSE POINT (unknown)
::	0x00000800 FILE_ATTRIBUTE_COMPRESSED		C: COMPRESSED
::	0x00001000 FILE_ATTRIBUTE_OFFLINE		O: OFFLINE
::	0x00002000 FILE_ATTRIBUTE_NOT_CONTENT_INDEXED	I: NOT CONTENT INDEXED
::	0x00004000 FILE_ATTRIBUTE_ENCRYPTED		E: ENCRYPTED
::	0x00010000 FILE_ATTRIBUTE_VIRTUAL		V: VIRTUAL
::	(n)NumberOfLinks: ##				No. of Hard Links (2-99)
::
:: 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.?ps by S.	Command path of fileinfo.exe improved.
:: 1.1ps by S.	Display method improved.
:: 1.0ps by S.	Created for fileinfo.exe Ver10 2008/05/13 in SDFMach: sdfw.zip
::
:: Related Softwares (required):
:: - fileinfo.exe Ver10 2008/05/13 in SDFMach: sdfw.zip (freeware, 32bit)
::   http://hp.vector.co.jp/authors/VA007219/sdfw.zip
::
:: Related Softwares (reference):
:: - Far Manager v2.0 build 1666 x64 (2010-09-10) (freeware, 64bit)
::   http://www.farmanager.com/download.php?p=64
::
:: Notes
:: - Attribute characters of fileinfo.exe Ver10 2008/05/13 in SDFMach: sdfw.zip
::   (cf. fileinfo.txt Ver10 2008/05/02 in SDFMach: sdfw.zip)
::	<DIR> DIRECTORY
::	A     ARCHIVE
::	S     SYSTEM
::	H     HIDDEN
::	R     READONLY
::	D     DEVICE
::	C     COMPRESSED
::	E     ENCRYPTED
::	Y     REPARSE_POINT SYMLINK (Reparse tag=a000000c)
::	M     REPARSE_POINT MOUNT_POINT (Reparse tag=a0000003)
::	L     REPARSE_POINT unknown
::	Z     SPARSE_FILE
::	I     NOT_CONTENT_INDEXED
::	O     OFFLINE
::	T     TEMPORARY
::	V     VIRTUAL
::-----------------------------------------------------------------------------

:begin
	setlocal enabledelayedexpansion
	set _AT_VRB=
	if .%1==.-vrb (
		set _AT_VRB=1
		shift /1
	)
	set _AT_WTF=
	if .%1==.-wtf (
		set _AT_WTF=1
		shift /1
	)
	set _AT_LOG=
	if .%1==.-log (
		set _AT_LOG=%~f2
		shift /1
		shift /1
	)
	set _AT_ATR=
	if .%1==.-req (
		set _AT_ATT=%~2
		for %%i in (A/a B/b C/c D/d E/e F/f G/g H/h I/i J/j K/k L/l M/m N/n O/o P/p Q/q R/r S/s T/t U/u V/v W/w X/x Y/y Z/z) do (
			for /F "tokens=1-2 delims=/" %%j in ("%%i") do (
				set _AT_WRK=*
				for /L %%l in (0,1,25) do (
					if "!_AT_ATT:~%%l,1!"=="%%j" set _AT_WRK=%%j
					if "!_AT_ATT:~%%l,1!"=="%%k" set _AT_WRK=%%k
				)
				if not %%j==Z set _AT_WRK=!_AT_WRK!,
			)
			set _AT_ATR=!_AT_ATR!!_AT_WRK!
		)
 		for /F "tokens=1-26 delims=," %%a in ("!_AT_ATR!") do (
rem			echo	"%%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z"
			if %%n==N set _AT_ATR=a,b,c,*,e,f,g,h,i,*,k,*,*,*,o,p,q,r,s,t,u,v,*,*,y,*
			if %%z==Z set _AT_ATR=A,B,C,*,*,F,G,H,I,*,K,*,*,*,O,P,Q,R,S,T,U,V,*,*,Y,*
		)
		for /F "tokens=1-26 delims=," %%a in ("!_AT_ATR!") do (
rem			echo	"%%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z"
			if "%_AT_LOG%"=="" (
				echo	%%r%%h%%s%%d%%a%%w%%n%%t%%p%%m%%j%%l%%x%%c%%o%%i%%e%%v	^(Requested and then Original/Modified Attr.^)
			) else (
				echo	%%r%%h%%s%%d%%a%%w%%n%%t%%p%%m%%j%%l%%x%%c%%o%%i%%e%%v	^(Requested and then Original/Modified Attr.^)>> "%_AT_LOG%"
			)
		)
		shift /1
		shift /1
	)
:	echo "%_AT_ATR%"
	if exist "%~f1" goto dispAttr

:usage
	echo Usage:
	echo  %~n0 [-vrb] [-wtf] [-log LOG] [-req ATR] OBJ [FWD] [ARG..]
	echo -vrb: Verbose Mode
	echo -wtf: Enable to display Last Written Time Field
	echo -log: Logging Mode
	echo -req: Request to change Attributes
	echo LOG:  Log File
	echo ATR:  Attributes to be requested (UPPER/lower: SET/reset)
	echo OBJ:  Objective DIR./FILE
	echo FWD:  Forwarding DIR./FILE for Reparse Points
	echo ARG:  Optional Argument
	echo.
	echo e.g. %~n0 -vrb -wtf -req RhSaCi objfile.txt
	echo e.g. %~n0 -vrb -wtf -req rHsAcI objfile.txt
	echo e.g. forfiles /P . /C "cmd /C xat -wtf @path"
	goto exit

:dispAttr
	set _AT_ATT=
	set /A _AT_WRK=0
	for /F "usebackq delims=" %%i in (`^("%~dp0fileinfo" -r "%~f1"^|more^)`) do (
		set _AT_ATT=!_AT_ATT!%%i
		if !_AT_WRK! GEQ  4 if !_AT_WRK! LEQ 20 set _AT_ATT=!_AT_ATT!,
		set /A _AT_WRK+=1
	)
:	echo "%_AT_ATT%"
	for /F "tokens=1-17* delims=," %%a in ("%_AT_ATT%") do (
		set _AT_ATT=
rem		echo	"%%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r"
rem			"a    bcdefghijklmnopqr"
rem		e.g.	"<DIR> ASHRDCYZIOTV 1* ba1ad973:001e000000022ff1 test"
rem			"           EM        "
rem			"            L        "
		if "%%c"=="A" (
			set _AT_ATT=!_AT_ATT!A,
		) else (
			set _AT_ATT=!_AT_ATT!a,
		)
		set _AT_ATT=!_AT_ATT!b,
		if "%%h"=="C" (
			set _AT_ATT=!_AT_ATT!C,
		) else (
			set _AT_ATT=!_AT_ATT!c,
		)
		if "%%a"=="<DIR>" (
			set _AT_ATT=!_AT_ATT!D,
		) else (
			set _AT_ATT=!_AT_ATT!d,
		)
		if "%%h"=="E" (
			set _AT_ATT=!_AT_ATT!E,
		) else (
			set _AT_ATT=!_AT_ATT!e,
		)
		set _AT_ATT=!_AT_ATT!f,g,
		if "%%e"=="H" (
			set _AT_ATT=!_AT_ATT!H,
		) else (
			set _AT_ATT=!_AT_ATT!h,
		)
		if "%%k"=="I" (
			set _AT_ATT=!_AT_ATT!I,
		) else (
			set _AT_ATT=!_AT_ATT!i,
		)
		if "%%i"=="M" (
			for /F "tokens=2 delims=?{" %%z in ("%%r") do if "%%z"=="\Volume" (
				set _AT_ATT=!_AT_ATT!j,
			) else (
				set _AT_ATT=!_AT_ATT!J,
			)
		) else (
			set _AT_ATT=!_AT_ATT!j,
		)
		set _AT_ATT=!_AT_ATT!k,
		if "%%i"=="Y" (
			set _AT_ATT=!_AT_ATT!L,
		) else (
			set _AT_ATT=!_AT_ATT!l,
		)
		if "%%i"=="M" (
			for /F "tokens=2 delims=?{" %%z in ("%%r") do if "%%z"=="\Volume" (
				set _AT_ATT=!_AT_ATT!M,
			) else (
				set _AT_ATT=!_AT_ATT!m,
			)
		) else (
			set _AT_ATT=!_AT_ATT!m,
		)
		if "%%a%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n"=="                 " (
			set _AT_ATT=!_AT_ATT!N,
		) else (
			set _AT_ATT=!_AT_ATT!n,
		)
		if "%%l"=="O" (
			set _AT_ATT=!_AT_ATT!O,
		) else (
			set _AT_ATT=!_AT_ATT!o,
		)
		if "%%j"=="Z" (
			set _AT_ATT=!_AT_ATT!P,
		) else (
			set _AT_ATT=!_AT_ATT!p,
		)
		set _AT_ATT=!_AT_ATT!q,
		if "%%f"=="R" (
			set _AT_ATT=!_AT_ATT!R,
		) else (
			set _AT_ATT=!_AT_ATT!r,
		)
		if "%%d"=="S" (
			set _AT_ATT=!_AT_ATT!S,
		) else (
			set _AT_ATT=!_AT_ATT!s,
		)
		if "%%m"=="T" (
			set _AT_ATT=!_AT_ATT!T,
		) else (
			set _AT_ATT=!_AT_ATT!t,
		)
		set _AT_ATT=!_AT_ATT!u,
		if "%%n"=="V" (
			set _AT_ATT=!_AT_ATT!V,
		) else (
			set _AT_ATT=!_AT_ATT!v,
		)
rem W?: DEVICE (reserved)
		if "%%g"=="D" (
			set _AT_ATT=!_AT_ATT!?,
		) else (
			set _AT_ATT=!_AT_ATT!-,
		)
rem X?: REPARSE POINT (unknown)
		if "%%i"=="L" (
			set _AT_ATT=!_AT_ATT!?,
		) else (
			set _AT_ATT=!_AT_ATT!-,
		)
rem No. of Hard Links (2-99) etc.
		if "%%q"==" " (
			set _AT_ATT=!_AT_ATT!%%p, %%r
		) else (
			set _AT_ATT=!_AT_ATT!%%p%%q,%%r
		)
	)
:	echo "%_AT_ATT%"
	for /F "tokens=1-26 delims=," %%a in ("%_AT_ATT%") do (
rem		echo	"%%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z"
		if .%_AT_VRB%==.1 (
			if %%r==R echo	0x00000001 FILE_ATTRIBUTE_READONLY		R: READONLY
			if %%h==H echo	0x00000002 FILE_ATTRIBUTE_HIDDEN		H: HIDDEN
			if %%s==S echo	0x00000004 FILE_ATTRIBUTE_SYSTEM		S: SYSTEM
			if %%d==D echo	0x00000010 FILE_ATTRIBUTE_DIRECTORY		D: DIRECTORY
			if %%a==A echo	0x00000020 FILE_ATTRIBUTE_ARCHIVE		A: ARCHIVE
			if %%w==? echo	0x00000040 FILE_ATTRIBUTE_DEVICE		?: DEVICE ^(reserved^)
			if %%n==N echo	0x00000080 FILE_ATTRIBUTE_NORMAL		N: NORMAL
			if %%t==T echo	0x00000100 FILE_ATTRIBUTE_TEMPORARY		T: TEMPORARY
			if %%p==P echo	0x00000200 FILE_ATTRIBUTE_SPARSE_FILE		P: SPARSE FILE
			if %%m==M echo	0x00000400 FILE_ATTRIBUTE_REPARSE_POINT		M: Volume Mount Point
			if %%j==J echo	0x00000400 FILE_ATTRIBUTE_REPARSE_POINT		J: Junction Point
			if %%l==L echo	0x00000400 FILE_ATTRIBUTE_REPARSE_POINT		L: Symbolic Link ^(only^)
			if %%x==? echo	0x00000400 FILE_ATTRIBUTE_REPARSE_POINT		?: REPARSE POINT ^(unknown^)
			if %%c==C echo	0x00000800 FILE_ATTRIBUTE_COMPRESSED		C: COMPRESSED
			if %%o==O echo	0x00001000 FILE_ATTRIBUTE_OFFLINE		O: OFFLINE
			if %%i==I echo	0x00002000 FILE_ATTRIBUTE_NOT_CONTENT_INDEXED	I: NOT CONTENT INDEXED
			if %%e==E echo	0x00004000 FILE_ATTRIBUTE_ENCRYPTED		E: ENCRYPTED
			if %%v==V echo	0x00010000 FILE_ATTRIBUTE_VIRTUAL		V: VIRTUAL
			if not %%y==1 echo	^(n^)NumberOfLinks: %%y				No. of Hard Links ^(2-99^)
		)
		if .%_AT_WTF%==.1 (
			set "_AT_WRK=%~nxt1"
		) else (
			set "_AT_WRK=%~nx1"
		)
		if "%_AT_LOG%"=="" (
			echo	%%r%%h%%s%%d%%a%%w%%n%%t%%p%%m%%j%%l%%x%%c%%o%%i%%e%%v %%y	!_AT_WRK!
		) else (
			echo	%%r%%h%%s%%d%%a%%w%%n%%t%%p%%m%%j%%l%%x%%c%%o%%i%%e%%v %%y	!_AT_WRK!>> "%_AT_LOG%"
		)
	)
	if "%_AT_ATR%"=="" goto exit

:execReq
:: if/THEN:
::  / R   H   S   A   I   P   C   M   J   L
:: / D/F D/F D/F D/F D/F D/F D/F D/F D/F D/F
:: -+---+---+---+---+---+---+---+---+---+---
:: r  1   1   1   1   1  -/0 1/1 1/- 1/- 1/0
:: h  0   1   0   0   0  -/1 1/1 1/- 1/- 1/1
:: s  0   0   1   0   0  -/1 1/1 1/- 1/- 1/1
:: a  1   1   1   1   1  -/1 1/1 1/- 1/- 1/1
:: i  1   1   1   1   1  -/1 1/1 1/- 1/- 1/1
:: p -/1 -/1 -/1 -/1 -/1 -/1 -/1 -/- -/- -/X
:: c 1/1 1/1 1/1 1/1 1/1 -/1 1/1 1/- X/- X/X
:: m X/- X/- X/- X/- X/- -/- 0/- 1/- -/- -/-
:: j L/- L/- L/- L/- L/- -/- 0/- -/- 1/- -/-
:: l L/1 L/1 L/1 L/1 L/1 -/0 0/0 -/- -/- 1/1

	for /F "tokens=1-26 delims=," %%a in ("%_AT_ATT%") do for /F "tokens=1-26 delims=," %%A in ("%_AT_ATR%") do (
rem		echo	"%%a%%b%%c%%d%%e%%f%%g%%h%%i%%j%%k%%l%%m%%n%%o%%p%%q%%r%%s%%t%%u%%v%%w%%x%%y%%z"
rem		echo	"%%A%%B%%C%%D%%E%%F%%G%%H%%I%%J%%K%%L%%M%%N%%O%%P%%Q%%R%%S%%T%%U%%V%%W%%X%%Y%%Z"
rem Reset Reparse Points for DIR.
		if %%m%%M%%d==MmD	mountvol "%~1" /D
		if %%j%%J%%d==JjD	fsutil reparsepoint delete "%~1"
		if %%l%%L%%d==LlD	fsutil reparsepoint delete "%~1"
rem Reset General Attr.
		set _AT_ATR=
		set _AT_WRK=
		if %%r==R (
			if %%p%%P%%d%%l==pPdl		set _AT_WRK= -R
			if %%p%%P%%d%%l%%L==pPdLl	set _AT_WRK= -R
rem			if %%p%%P%%d%%l==Ppdl		set _AT_WRK= -R
rem			if %%p%%P%%d%%l%%L==PpdLl	set _AT_WRK= -R
			if %%l%%L%%d==lLd		set _AT_WRK= -R
			if %%l%%L%%d==Lld		set _AT_WRK= -R
		)
		if %%r%%R==Rr	set _AT_WRK= -R
		set _AT_ATR=!_AT_ATR!!_AT_WRK!
		set _AT_WRK=
		if %%h==H (
			if %%p%%P%%d%%l==pPdl		set _AT_WRK= -H
			if %%p%%P%%d%%l%%L==pPdLl	set _AT_WRK= -H
rem			if %%p%%P%%d%%l==Ppdl		set _AT_WRK= -H
rem			if %%p%%P%%d%%l%%L==PpdLl	set _AT_WRK= -H
			if %%l%%L%%d==lLd		set _AT_WRK= -H
			if %%l%%L%%d==Lld		set _AT_WRK= -H
			if %%r%%R==rR	set _AT_WRK= -H
			if %%r%%R==Rr	set _AT_WRK= -H
			if %%s%%S==sS	set _AT_WRK= -H
			if %%s%%S==Ss	set _AT_WRK= -H
			if %%a%%A==aA	set _AT_WRK= -H
			if %%a%%A==Aa	set _AT_WRK= -H
			if %%i%%I==iI	set _AT_WRK= -H
			if %%i%%I==Ii	set _AT_WRK= -H
		)
		if %%h%%H==Hh	set _AT_WRK= -H
		set _AT_ATR=!_AT_ATR!!_AT_WRK!
		set _AT_WRK=
		if %%s==S (
			if %%p%%P%%d%%l==pPdl		set _AT_WRK= -S
			if %%p%%P%%d%%l%%L==pPdLl	set _AT_WRK= -S
rem			if %%p%%P%%d%%l==Ppdl		set _AT_WRK= -S
rem			if %%p%%P%%d%%l%%L==PpdLl	set _AT_WRK= -S
			if %%l%%L%%d==lLd		set _AT_WRK= -S
			if %%l%%L%%d==Lld		set _AT_WRK= -S
			if %%r%%R==rR	set _AT_WRK= -S
			if %%r%%R==Rr	set _AT_WRK= -S
			if %%h%%H==hH	set _AT_WRK= -S
			if %%h%%H==Hh	set _AT_WRK= -S
			if %%a%%A==aA	set _AT_WRK= -S
			if %%a%%A==Aa	set _AT_WRK= -S
			if %%i%%I==iI	set _AT_WRK= -S
			if %%i%%I==Ii	set _AT_WRK= -S
		)
		if %%s%%S==Ss	set _AT_WRK= -S
		set _AT_ATR=!_AT_ATR!!_AT_WRK!
		if %%a%%A==Aa	set _AT_ATR=!_AT_ATR! -A
		if %%i%%I==Ii	set _AT_ATR=!_AT_ATR! -I
		if %%d==D (
			if %%m%%M==MM	set _AT_ATR=
			if %%m%%M==M*	set _AT_ATR=
			if %%j%%J==JJ	set _AT_ATR=
			if %%j%%J==J*	set _AT_ATR=
			if %%l%%L==LL	set _AT_ATR=
			if %%l%%L==L*	set _AT_ATR=
rem			if not "!_AT_ATR!"==""	echo	attrib!_AT_ATR! "%~1"
			if not "!_AT_ATR!"==""		attrib!_AT_ATR! "%~1"
		) else (
rem			if not "!_AT_ATR!"==""	echo	attrib!_AT_ATR! "%~1" /S /D /L
			if not "!_AT_ATR!"==""		attrib!_AT_ATR! "%~1" /S /D /L
		)
rem Reset Special Attr.
		if %%l%%L%%d==Lld (
			fsutil reparsepoint delete "%~1"
			if %%a==a	attrib -A "%~1"
			if %%a%%A==Aa	attrib -A "%~1"
		)
		if %%v%%V==Vv			if .%_AT_VRB%==.1 echo Can't reset V: VIRTUAL
		if %%o%%O==Oo			if .%_AT_VRB%==.1 echo Can't reset O: OFFLINE
		if %%t%%T%%d==Ttd		if .%_AT_VRB%==.1 echo Can't reset T: TEMPORARY
		if %%p%%P%%d%%l==Ppdl		if .%_AT_VRB%==.1 echo Can't reset P: SPARSE FILE
		if %%p%%P%%d%%l%%L==PpdLl	if .%_AT_VRB%==.1 echo Can't reset P: SPARSE FILE
		if %%e%%E==Ee			cipher /D "%~1" > nul
		if %%c%%C%%m%%j%%l==Ccmjl	compact /U /Q "%~1" > nul
		if %%c%%C%%m%%M==CcMm		compact /U /Q "%~1" > nul
		if %%c%%C%%j%%J==CcJj		compact /U /Q "%~1" > nul
		if %%c%%C%%l%%L==CcLl		compact /U /Q "%~1" > nul
rem Set Special Attr.
		if %%c%%C%%m%%j%%l==cCmjl	compact /C /Q "%~1" > nul
		if %%c%%C%%m%%M==cCMm		compact /C /Q "%~1" > nul
		if %%c%%C%%j%%J==cCJj		compact /C /Q "%~1" > nul
		if %%c%%C%%l%%L==cCLl		compact /C /Q "%~1" > nul
		if %%e%%E==eE			cipher /E "%~1" > nul
		if %%p%%P%%d%%l==pPdl		fsutil sparse setflag "%~1" > nul
		if %%p%%P%%d%%l%%L==pPdLl	fsutil sparse setflag "%~1" > nul
		if %%t%%T%%d==tTd		if .%_AT_VRB%==.1 echo Can't set T: TEMPORARY
		if %%o%%O==oO			if .%_AT_VRB%==.1 echo Can't set O: OFFLINE
		if %%v%%V==vV			if .%_AT_VRB%==.1 echo Can't set V: VIRTUAL
		if %%l%%L%%d==lLd		if .%_AT_VRB%==.1 echo Can't set L: Symbolic Link ^(only^)
rem Set General Attr.
		set _AT_ATR=
		set _AT_WRK=
		if %%r==R (
			if %%p%%P%%d%%l==pPdl		set _AT_WRK= +R
			if %%p%%P%%d%%l%%L==pPdLl	set _AT_WRK= +R
rem			if %%p%%P%%d%%l==Ppdl		set _AT_WRK= +R
rem			if %%p%%P%%d%%l%%L==PpdLl	set _AT_WRK= +R
			if %%l%%L%%d==lLd		set _AT_WRK= +R
			if %%l%%L%%d==Lld		set _AT_WRK= +R
		)
		if %%r%%R==Rr	set _AT_WRK=
		if %%r%%R==rR	set _AT_WRK= +R
		set _AT_ATR=!_AT_ATR!!_AT_WRK!
		set _AT_WRK=
		if %%h==H (
			if %%p%%P%%d%%l==pPdl		set _AT_WRK= +H
			if %%p%%P%%d%%l%%L==pPdLl	set _AT_WRK= +H
rem			if %%p%%P%%d%%l==Ppdl		set _AT_WRK= +H
rem			if %%p%%P%%d%%l%%L==PpdLl	set _AT_WRK= +H
			if %%l%%L%%d==lLd		set _AT_WRK= +H
			if %%l%%L%%d==Lld		set _AT_WRK= +H
			if %%r%%R==rR	set _AT_WRK= +H
			if %%r%%R==Rr	set _AT_WRK= +H
			if %%s%%S==sS	set _AT_WRK= +H
			if %%s%%S==Ss	set _AT_WRK= +H
			if %%a%%A==aA	set _AT_WRK= +H
			if %%a%%A==Aa	set _AT_WRK= +H
			if %%i%%I==iI	set _AT_WRK= +H
			if %%i%%I==Ii	set _AT_WRK= +H
		)
		if %%h%%H==Hh	set _AT_WRK=
		if %%h%%H==hH	set _AT_WRK= +H
		set _AT_ATR=!_AT_ATR!!_AT_WRK!
		set _AT_WRK=
		if %%s==S (
			if %%p%%P%%d%%l==pPdl		set _AT_WRK= +S
			if %%p%%P%%d%%l%%L==pPdLl	set _AT_WRK= +S
rem			if %%p%%P%%d%%l==Ppdl		set _AT_WRK= +S
rem			if %%p%%P%%d%%l%%L==PpdLl	set _AT_WRK= +S
			if %%l%%L%%d==lLd		set _AT_WRK= +S
			if %%l%%L%%d==Lld		set _AT_WRK= +S
			if %%r%%R==rR	set _AT_WRK= +S
			if %%r%%R==Rr	set _AT_WRK= +S
			if %%h%%H==hH	set _AT_WRK= +S
			if %%h%%H==Hh	set _AT_WRK= +S
			if %%a%%A==aA	set _AT_WRK= +S
			if %%a%%A==Aa	set _AT_WRK= +S
			if %%i%%I==iI	set _AT_WRK= +S
			if %%i%%I==Ii	set _AT_WRK= +S
		)
		if %%s%%S==Ss	set _AT_WRK=
		if %%s%%S==sS	set _AT_WRK= +S
		set _AT_ATR=!_AT_ATR!!_AT_WRK!
		if %%a%%A==aA	set _AT_ATR=!_AT_ATR! +A
		if %%i%%I==iI	set _AT_ATR=!_AT_ATR! +I
		if %%d==D (
			if %%m%%M==MM	set _AT_ATR=
			if %%m%%M==M*	set _AT_ATR=
			if %%j%%J==JJ	set _AT_ATR=
			if %%j%%J==J*	set _AT_ATR=
			if %%l%%L==LL	set _AT_ATR=
			if %%l%%L==L*	set _AT_ATR=
rem			if not "!_AT_ATR!"==""	echo	attrib!_AT_ATR! "%~1"
			if not "!_AT_ATR!"==""		attrib!_AT_ATR! "%~1"
		) else (
rem			if not "!_AT_ATR!"==""	echo	attrib!_AT_ATR! "%~1" /S /D /L
			if not "!_AT_ATR!"==""		attrib!_AT_ATR! "%~1" /S /D /L
		)
rem Set Reparse Points for DIR.
		if %%l%%L%%d==lLD	if .%_AT_VRB%==.1 echo Can't set L: Symbolic Link ^(only^)
		if %%j%%J%%d==jJD	if .%_AT_VRB%==.1 echo Can't set J: Junction Point
		if %%m%%M%%d==mMD (
			if exist "%~2" (
				mountvol "%~1" %~2
			) else (
				if .%_AT_VRB%==.1 echo Can't set M: Volume Mount Point
			)
		)
	)
	set _AT_ATR=
	goto dispAttr

:abort
	echo.
	echo Aborted: %~n0
:exit
:	echo.
	endlocal
:	pause
:end
/* 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