Jump to content

How can I make a shortcut undeletable?


pwillener

Recommended Posts

Hello, everyone - I haven't been around here for a while...

 

I have a shortcut in my %TEMP% folder that I need to keep. I have made that shortcut read-only, and it usually stays there for a while.

 

But sometimes (not every time) after I run CCleaner, that shortcut is gone.

 

How can I make that shortcut file undeletable?

 

(I have tried to add it to the CCleaner exceptions (Exclude), but it won't accept that shortcut.lnk filename. When I type the filename and click Open, it will just go to the target folder of that shortcut.)

 

 

Edit: system is Windows XP-SP3, file system NTFS.

Link to comment
Share on other sites

  • Moderators

Hi PW,

 

I just dragged a shortcut to the Exclude list and the .lnk filename was preserved. You could also try right clicking on the bad included file and selecting Manual Edit and then correcting the file name. (XPSP3 too.)

Link to comment
Share on other sites

From my very first days with DOS the purpose of %TEMP% was for "Work In Progress" and when an application closed it had a duty to remove its W.I.P.

AutoExec.BAT always deleted %TEMP% on start-up because some applications failed in their duty, and some applications left junk when they crashed.

 

Sorry for being nosey but why is the shortcut located in %TEMP% when there are so many other folders that are more suited to permanent retention ?

Link to comment
Share on other sites

Sorry for being nosey but why is the shortcut located in %TEMP% when there are so many other folders that are more suited to permanent retention ?

I'll be happy to explain...

 

I have a web application (HTML, JavaScript, PostgreSQL) from which I generate dozens of Excel docs every day. These docs must be saved in a specific folder for further processing.

 

However, when I click Save As is Excel, it always opens in the Temp folder. This is why I created a shortcut in there to quickly redirect me to the target folder.

 

If you have any suggestion how I can avoid that Temp folder, I'd be very happy. (The Excel docs are created from Firefox 3.6).

Link to comment
Share on other sites

I'll be happy to explain...

 

I have a web application (HTML, JavaScript, PostgreSQL) from which I generate dozens of Excel docs every day. These docs must be saved in a specific folder for further processing.

 

However, when I click Save As is Excel, it always opens in the Temp folder. This is why I created a shortcut in there to quickly redirect me to the target folder.

 

If you have any suggestion how I can avoid that Temp folder, I'd be very happy. (The Excel docs are created from Firefox 3.6).

Start Excel and go into Excel Options-->Save and see what the default save folder location is set to. Mine is set to the Documents folder.

 

 

Win10 Pro x64 Desktop (Speccy) - Win10 Pro x64 Laptop (Speccy)

Link to comment
Share on other sites

Thank you; mine is already set to the target folder I want, but it still opens in the Temp folder:

 

 

Well, at least CCleaner does no longer delete my shortcut in the Temp file...

Link to comment
Share on other sites

If you fear losing the Temp folder as a result of something other than a CCleaner malfunction,

you could try using the DOS command CACLS to protect it from deletion,

but CACLS is very powerful and dangerous and uses various arguments.

I have only felt confident using it after creating and validating a Macrium partition image backup,

and finding my Macrium Boot CD in case CACLS makes the PC unbootable.

 

I'll be happy to explain...

 

I have a web application (HTML, JavaScript, PostgreSQL) from which I generate dozens of Excel docs every day. These docs must be saved in a specific folder for further processing.

 

However, when I click Save As is Excel, it always opens in the Temp folder. This is why I created a shortcut in there to quickly redirect me to the target folder.

 

If you have any suggestion how I can avoid that Temp folder, I'd be very happy. (The Excel docs are created from Firefox 3.6).

 

Are you saying that Microsoft Excel is one of those incompetent applications which is unable to create a Temp folder when it needs one.

It really would not surprise me ! !

Link to comment
Share on other sites

I think the reason is that when the generated file is opened in Excel, Firefox has already saved the file under a temp name in the Temp folder. This is probably why Temp is offered as the target when I use Save As.

 

Anyway, my shortcut is no longer deleted, but you made me curious about CACLS, so I will read up on it a bit...

Link to comment
Share on other sites

I think the reason is that when the generated file is opened in Excel, Firefox has already saved the file under a temp name in the Temp folder. This is probably why Temp is offered as the target when I use Save As.

 

I use Firefox 4.0.1, and that by default always uses E:\Downloads for me when I select "File => Save Page As..."

I configured that destination via "Tools => Options => Downloads => File/Window => All Files Downloaded To: Browse "

Link to comment
Share on other sites

Thanks for the info; I have the same on Firefox 3.6

 

I cannot currently use Firefox 4, as there is some conflict with my current PostgreSQL version (when I tried FF4 a few weeks ago, all inserts ended up duplicate in the database).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.