Update: I found out how to make it much faster:
if you go to My account > My Uploads and select the whole table which is displaying 1 to 20 of xxxx matches - you can paste it in some smart HTML-editor like Adobe Dreamweaver - it has that very nice function "Find and Replace">"Replace All". So I just made bulk replacement of
Nice!
However if you want a list of IDs for ALL files and not just 20 per page:
use DeepMeta
fetch statistics
in the "Files" tab, select everything and right click to copy
paste into a text file and save as .csv
open in Excel: IDs in first column, or full edit links in column AE
replace as per your post