I am using below batch script to divide my large text file into multiple files based on the no of lines -
@Echo Off
Setlocal EnableExtensions DisableDelayedExpansion
Set "inFile=%1%"
Set "nLines=50000"
If Not Exist "%inFile%" GoTo :EOF
For %%A In ("%inFile%") Do Set "fName=%%~nA"&Set "fExt=%%~xA"
Set "count=0"
For /F %%A In ('Find /C /V ""^<"%inFile%"') Do Set "fLines=%%A"
(For /L %%A In (1 1 %fLines%) Do (Set/P "data="
Set/A "file=(count/%nLines%)+1", "count+=1"
SetLocal EnableDelayedExpansion
(Echo=!data!)>>"%fName%_!file!%fExt%"
EndLocal))<"%inFile%"
EndLocal
GoTo :EOF
while running this batch file from cmd i am not getting any error and getting the desired output. But when i run the same from BP start Process action it gives me "
access is denied" error. please help me to find the issue. I have attached error image for the reference.
------------------------------
Rajkumari choudhary
------------------------------