manage files from SD card over internet

Hi,
if i resume i could create a link to go to /myserveur/remove and then list files and delete them by an action (mouse click for example).

But how can i choose parameters and conditions in the removing case ?
I don't know how to translate this "pseudo-code", i wish you could help me and tell me if it's a good solution :

void remove_files(file, ...){
if(file in directory is clicked){
filename=file;
send to serveur SD.remove(filename);
delay and refreshing}}