fai un ciclo do...loop con Dir().:gren:
quella è la funzione per ottenere tutti i file presenti in 1 directorycodice:private function GetDirFiles(sDir as string, Files()as string) as long Dim ThisFile as string,fCoutnas long redim files(0) ThisFile=Dir(sDir & "\*.*") do while thisfile<>"" files(fCount)=thisfile fCount=fCount+1 redim preserve files(fcount) thisFile=dir() loop if fcount > 0 then _ redim preserve files(fcount-1) getDirfiles =fCount End function
poi nel form
spero di essere stato kiaro!codice:Dim files()as string,fCount as long fCount=GetDirFiles("C:\Documenti",files()) 'poi cicli sulla matrice for a=0 to fCount-1 'nel prefizzo metti quello ke vuoi tu prefisso="File" & a+1 'per rinominare il file name files(a), prefisso & files(a) next a
ciao........
![]()
![]()

Rispondi quotando