ShadowThief wrote:sivasriram wrote:no output nothing this time , even txt file not created in this case
Try this. If the path has spaces in it, the whole thing needs to be surrounded by double quotes.Code: Select all
@echo off
cls
set file_name="C:\Documents and Settings\Prudhvi\Desktop\12\22.pdf"
echo|set /p=%file_name%,>>pdf_num.txt
findstr /R /C:"/Type\s*/Page[^s]" "%file_name%"|find /c /v "">>pdf_num.txt
here is it
set file_name="C:\Documents and Settings\Prudhvi\Desktop\12\22.pdf"
echo|set /p=%file_name%,>>pdf_num.txt
findstr /R /C:"/Type\s*/Page[^s]" "%file_name%"|find /c /v "">>pdf_num.txt
FINDSTR: Cannot open C:\Documents
FINDSTR: Cannot open and
FINDSTR: Cannot open Settings\Prudhvi\Desktop\12\22.pdf