LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Delete File After Download (https://www.linuxquestions.org/questions/linux-newbie-8/delete-file-after-download-792208/)

richardgp 02-28-2010 04:56 PM

Delete File After Download
 
Hi guy/gals

My 1st Question..

I have just set up my own very 1st website.
Very simple format for now. I know there is a lot to learn.
Currently I have an .xls file set up for download. The file itself is set up with internal triggers and VBA code that activates the file for use after the initial download and then activates other protections set up to keep the file from being copied or renamed. I just figured out that once the file is downloaded the internal triggers have gone off not only on the file that was downloaded which was the goal but also on the file sitting on the website which was not the goal. The end result is the file on the website is only good for one download and then is corrupted. I can work around the issue if I can delete the file after the download. Then I would just set up multiple files and each would delete after a download. Thus the goal is..

1. Delete File After Download.

2. Allow for the Option to "Save" Only.
I also need to block the "Open" file scenario.

Can I get some help on script for this and how I would go about setting it up?

Thanks
rp

XavierP 02-28-2010 05:06 PM

Why not have the file marked as read-only right before download? So the download triggers a permission change and can then be changed back after download, would that stop the corruption?

devnull10 02-28-2010 05:25 PM

Are you sure!??! It sames extremely strange that you would allow a file downloaded locally to modify your master version on the server. I would imagine what the problem is, is that you download the file which is then cached on your local machine so when you download it again you are actually opening the cached version.

richardgp 03-01-2010 03:42 AM

Thanks Xavier,

I'll give that a shot today and let you know what happened..

richardgp 03-01-2010 05:46 PM

Delete File After Download
 
Well...

I went through more testing and the issue no longer seems to be relevant thus I now believe Devnull was on the mark..

Thanks for the help guys..

You wouldn't know how I can stop the emailing of an open file in VBA code would you?

I would like to force the closure of the file and the only option to email is to attach it from its folder location.

rp


All times are GMT -5. The time now is 10:56 AM.