Okay, you're not capturing the variable.
$dest="scarica.php?nome_file=".$f; // This line is fine
There are two main ways of passing data between pages, POST and GET. There are other ways i.e. sessions and cookies, but that's not what we're looking at here.
Whenever you see a website using a string such as the following
<a href="path/to/my/file.php?name=dave">
That's the get method.
You need to parse these variables after the ?
So the problem you're having here is the fact that your second php file needs to get the variable from the query string
<?php //scarica.php
$nome_file = $_GET['nome_file'];
header("Content-type:*");
header("Content-Disposition: inline; filename=".$nome_file);
readfile($nome_file);
exit;
?>
Whenever you're passing any sort of data via a query string, you need to use the get method to capture the data.
So for example
file.php?name=dave&age=22
your php file would need to read
$name = $_GET['name'];
$age = $_GET['age'];
echo $name; // Would echo my name
echo $age; // would echo my age
Hope this helps