I've been trying to figure this out too. Unfortunately, documentation and examples in "Google Drive Script" are rare, but below is my implementation that replaces the deprecated methods in Julien's example.
It work up to the last line, where I get the following message on the call to add the file to the folder: Cannot convert [object Object] to File. (line 35).
If we can figure out what causes the file variable to be recognized as an object instead of google doc, we could be in business.
function convert() {
var targetFolder_1 = DriveApp.getFoldersByName('ProvaSport');
var targetFolder = targetFolder_1.next(); // getFoldersByName returns an iterator, use .next() to get Folder
var folderGoogify_1 = DriveApp.getFoldersByName('TransferTest');
var folderGoogify = folderGoogify_1.next();
var counter = 0;
var files = targetFolder.getFiles();
var folderID = targetFolder.getId();
while (files.hasNext()) {
var nextFile = files.next();
var blob = nextFile.getBlob();
var fileName = nextFile.getName();
//var kind = nextFile.getParents();
//var id = nextBlob.getId();