vb.net - How do I delete number of files from folder in asp.net? -


I have a list of albums and albums. Now I want that when I delete a particular album, its photos will also be removed. The name of the images of a particular album is "ID 1, such as the album's name should be 1_1.1_2, hence the name of the name of" 1_ "in the time of the album's extinction.How do I remove the images, I have been confusing the "1_" in the prefix. My code is

  String = "imagefolder = Server.MapPath (" ~ / ") as a Col_Alb_Ids Dynamic Image file in each album_id. DesktopModules / Albums / Images Upload / ") as String Ss = string_l_id and" _ "i Magefolder.Contains (ss) Dim AA string = imagefolder + ss if file.exists (imagefolder.contain (aa)) then file.delete (aa) and enfame `   

You can call Directory.GetFiles in a wildcard for search:

C # Code

  string [] albumFiles = directory .GetFiles (imageFolder, ss + "*. *");    

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

c# - Confused over DLL entry points (entry point not found exception) -