close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

how to delete old files after updating with new file?

Thread began 11/08/2009 9:58 am by drmovi393161 | Last modified 12/14/2009 4:24 pm by Eric Mittman | 1961 views | 6 replies |

drmovi393161

how to delete old files after updating with new file?

ok this is the issue
when use dataassist to create result,update,insert and delete pages
the use digital file pro in update & insert pages
suppose you upload a file to the server with dfp then you need to replace this file with another one so you chose the update page and enter the new file
when click update the file is uploaded and saved in the database that's ok
but the old file is still on the server
NB : use of overwite if file exist may cause error as you may upload many files with the same name and want to use them all so you need to set the if file exist field to increament option

any suggestion for deletion of the old unused file after update?

Sign in to reply to this post

Cologne

Take the delete server behavior. set the trigger to IMAGE UPLOAD SUCCESS, and then delete the old image.

normaly you have got the image name in the recordset. so select the trigger, select the folder and select the imagename from the recordset.

that should work.

Denis

Sign in to reply to this post

drmovi393161

thanks for you share i'll try it now

Sign in to reply to this post

drmovi393161

ok i choose delete file and in the trigger the is no upload success option ?

Sign in to reply to this post

Eric Mittman

This trigger should be an option on any page that you have applied the Digital File Pro upload server behavior to. I'm including a screen shot of what should be listed in the available triggers on an upload page for reference.

Are you applying this to your upload page? Do you have the name of the file stored in your db? If so you should try using the file name itself from the recordset as the trigger.

Sign in to reply to this post

John LangerBeta Tester

Brilliant

On my current project I needed a solution as described above. So I did a search and found this thread.

Following the suggestions here I was able to implement this in about 3 minutes. Not only just delete the old image though, but to delete the image that was in a dynamically created and named folder.

By applying the behaviour twice, I was also able to delete the thumbnail as well (in a seperate dynamically created and named folder).

Well done WA on this extension that has so many hidden depths.

Sign in to reply to this post

Eric Mittman

That is great to hear, I'm always happy to see user's get the most out of our products.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...