brakuje kilku else, break, i st+=1.
GML
copdir=get_directory_alt("WSKAŻ FOLDER Z PLIKAMI","");
pasdir=get_directory_alt("WSKAŻ FOLDER WYJŚCIOWY","");
st=1;
while(1)
{
if st=1
{
fnm=file_find_first(copdir,0);
if fnm="" break;
nm=fnm;
i=1;
while(1)
{
if !file_exists(pasdir+"\"+nm)
{
file_copy(copdir+"\"+fnm,pasdir+"\"+nm);
st+=1;
break;
}
else
{
i+=1;
nm=string(i)+"_"+fnm;
file_copy(copdir+"\"+fnm,pasdir+"\"+nm);
st+=1;
break;
}
}
}
else
{
fnm=file_find_next();
if fnm="" break;
nm=fnm;
i=1;
while(1)
{
if !file_exists(pasdir+"\"+nm)
{
file_copy(copdir+"\"+fnm,pasdir+"\"+nm);
break;
}
else
{
i+=1;
nm=string(i)+"_"+fnm;
file_copy(copdir+"\"+fnm,pasdir+"\"+nm);
st+=1;
break;
}
}
}
}