Dir2File

Title Dir2File
File Name Dir2File.txt
Description Transform directories to zero-size files
Author Vochomurka
Parameters List, Target_path, Extension
Plugins Called file
Icon
Version 1.0
Updated on 28.10.19
args List, Target, Ext

local fh = file.open(List, "r")
local Str, Out, New

if(fh > 0) do
	for(!fh.eof)
		Str = fh.readstring
		if(!Str)
			continue

		if(!file.isfolder(Str))
			continue

;;Sub_ParsePath - name of script ParsePath
		New = Target ++ .Subs\Sub_ParsePath(Str, 1) ++ "." ++ Ext
		Out = file.open(New, "w")

		if(!Out) do
			messagebox("ok error", New ++ " not created", "File Plugin Error #2")
			quit all
		endif

		Out.close
	endfor
else
	messagebox("ok error", "File not opened", "FILE plugin error #1")
endif

fh.close

Main Page Total Commander PowerPro