function getIniKeysNumber(sectionname, path)
menu1=0
num1, num2 = reaper.BR_Win32_GetPrivateProfileString(sectionname, tostring(menu1 +1), "nil", path)
if (num2  ~= "nil") then
menu1 = menu1 +1
    for i = 0, 100000 do
num1, num2 = reaper.BR_Win32_GetPrivateProfileString(sectionname, tostring(menu1), "nil", path)
if  num2  ~= "nil" then
menu1 = menu1 +1
else
--menu1 = menu1 +1
break
end
end
end
return menu1
end

local inipath = reaper.GetResourcePath()
local  pathfull =inipath  .. "\\ini\\dj temp.ini"

oror = getIniKeysNumber("0", pathfull )
reaper.osara_outputMessage(oror)
io =getIniKeysNumber("0", pathfull)
if (io >0) then
for i = 1, io -1 do
num11, num22 = reaper.BR_Win32_GetPrivateProfileString("0", tostring(i), "", pathfull)
if not (num22  == "") then
 reaper.Xen_StopSourcePreview(tonumber(num22))
end
end
end

local path = reaper.GetResourcePath().."\\ini\\temp\\dj temp.ini"
local path2 = reaper.GetResourcePath().."\\ini\\"
 os.remove(path2  .. "\\dj temp.ini")
  local CopyCmd = reaper.GetOS():find("Win") and 'copy "' or 'cp "'
 os.execute(CopyCmd .. path .. '" "' .. path2 .. '"')
