Advertisement
npocmaka

fileinfo.bat

Nov 6th, 2013
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.73 KB | None | 0 0
  1. ; @echo off
  2. ;;setlocal DISABLEDELAYEDEXPANSION ENABLEEXTENSIONS
  3. ;;goto :end_help
  4. ;;;
  5. ;;; by Vasil "npocmaka" Arnaudov
  6. ;;;
  7. ;;; fileinf /l list of full file paths separated with ; (if file is more than one enclose all of them in double quotes)
  8. ;;; fileinf /f text file with a list of files to be processed ( one on each line )
  9. ;;; fileinf /? prints the help
  10. ;;;
  11. ;;:end_help
  12.  
  13. ; REM Creating a Newline variable (the two blank lines are required!)
  14. ; set NLM=^
  15.  
  16.  
  17. ; set NL=^^^%NLM%%NLM%^%NLM%%NLM%
  18. ; if "%~1" equ "/?" type "%~f0" | find ";;;" | find /v "find" && exit /b 0
  19. ; if "%~2" equ "" type "%~f0" | find ";;;" | find /v "find" && exit /b 0
  20. ; setlocal enableDelayedExpansion
  21. ; if "%~1" equ "/l" (
  22. ;  set "_files=%~2"
  23. ;  echo !_files:;=%NL%!>"%TEMP%\file.paths"
  24. ;  set _process_file="%TEMP%\file.paths"
  25. ;  goto :get_info
  26. ; )
  27.  
  28. ; if "%~1" equ "/f" if exist "%~2" (
  29. ;  set _process_file="%~2"
  30. ;  goto :get_info
  31. ; )
  32.  
  33. ; echo incorect parameters & exit /b 1
  34. ; :get_info
  35. ; set "file_info="
  36.  
  37. ; makecab /d InfFileName=%TEMP%\file.inf /d "DiskDirectory1=%TEMP%" /f "%~f0"  /f %_process_file% /v0>nul
  38.  
  39. ; for /f "usebackq skip=4 delims=" %%f in ("%TEMP%\file.inf") do (
  40. ;  set "file_info=%%f"
  41. ;  echo !file_info:,=%nl%!
  42. ; )
  43.  
  44. ; endlocal
  45. ;endlocal
  46. ; del /q /f %TEMP%\file.inf 2>nul
  47. ; del /q /f %TEMP%\file.path 2>nul
  48. ; exit /b 0
  49.  
  50. .set DoNotCopyFiles=on
  51. .set DestinationDir=;
  52. .set RptFileName=nul
  53. .set InfFooter=;
  54. .set InfHeader=;
  55. .Set ChecksumWidth=8
  56. .Set InfDiskLineFormat=;
  57. .Set Cabinet=off
  58. .Set Compress=off
  59. .Set GenerateInf=ON
  60. .Set InfDiskHeader=;
  61. .Set InfFileHeader=;
  62. .set InfCabinetHeader=;
  63. .Set InfFileLineFormat=",file:*file*,date:*date*,size:*size*,csum:*csum*,time:*time*,vern:*ver*,vers:*vers*,lang:*lang*"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement