Page 1 of 1

create .txt files

Posted: 12 Apr 2018 08:03
by joejames_786
hi

can someone help me ?


source folder is C:\update
destination folder is D:\despatch


source folder contains 1000,s of .xml files

I want a script to count the number of .xml files in that folder and
equally create .txt files in another folder (ie.. if .xml is 1025 then the number of .txt files
created is 1025)

thanx in advance

Re: create .txt files

Posted: 12 Apr 2018 08:15
by aGerman
It really sounds to me that you have some kind of XY Problems :?
untested:

Code: Select all

@for /f %%i in ('dir /a-d /b "C:\update\*.xml"^|find /c /v ""') do @for /l %%j in (1 1 %%i) do @type nul>"D:\despatch\%%j.txt"
Steffen