Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > alt.comp.os.windows-10 > #182576
| From | VanguardLH <V@nguard.LH> |
|---|---|
| Newsgroups | alt.comp.os.windows-10 |
| Subject | Re: Windows %TEMP% folder & files |
| Date | 2025-02-26 13:55 -0600 |
| Organization | Usenet Elder |
| Message-ID | <efdmopoyrrpm.dlg@v.nguard.lh> (permalink) |
| References | <vpn7gg$2jeht$1@dont-email.me> |
Jim Dell <Jim.Dell@gmail.com> wrote: > Got a question about the files in %TEMP% > > There are thousands of them on my system > > If you run “dir %TEMP%” from a command prompt you’ll see them. > > Mostly mine are > HeadlessChrome304648710500 > scoped_dir304_1457881672 > folders > > The only thing that changes is the numbers after the text. > > Yes, a run a Chrome Headless job. Is there a parameter to set to I > should set to prevent the HeadlessChrome folders? > > I don’t know what is causing the scoped_dir folders from being created. To see which process, if any currently, have a handle on those files, you can use Sysinternals' handle. https://learn.microsoft.com/en-us/sysinternals/downloads/handle If nothing has a handle on a file, but the file reappears after you deleted it, you can use SysInternals' Process Monitor (FileMon is no longer available) to see which process created the file. Filter on the [path]filename to reduce the log to see what is accessing just that file. You don't need to include the path to the file unless the same-named file is in multiple folders. https://learn.microsoft.com/en-us/sysinternals/downloads/procmon You can schedule an event in Task Scheduler, or add a shortcut as a startup item, that runs a command to do cleanup on Windows account login. I use CCleaner for cleanup; however, I defined firewall rules to block its outbound connections trying to retrieve ads (Avast turned Piriform's CCleaner cleaner after Avast acquired Piriform). To run from the command line, in a scheduled event, or using a shortcut, use: ccleaner.exe /auto That runs CCleaner without user intervention; i.e, it runs, cleans, and exits. For the shortcut, I also configure it to run in a minimized window, so all I see is its Taskbar button. You can have it clean the %temp%, and other folders when it runs, but sometimes temp files are used during an install. The installer needs to replace files, but they are currently in-use/locked, so the installer restarts Windows to use a registry key to delete the in-use files, and copy new files in their place. The temp files could be the ones to get replaced, or just the rest of the install script to do the replacing. To avoid losing a pending install, I have CCleaner configured to delete temp files that are over 1 day old. I don't need to pay for CCleaner to get it to run scheduled. Paying gets that option, but I can use the Task Scheduler and the /auto command line parameter to effect the same (which is likely what payware CCleaner does, too). I also added a shortcut to a toolbar in the Taskbar to run "ccleaner.exe /auto" when I choose. There are lots of other cleanup tools, like Bleachbit which I looked at, but stuck with CCleaner only because I was able to neuter the ad platform added by Avast, but that means I have to check for updates since the program is blocked from the network (I prefer to schedule if and when to look for updates rather than have software shove it at me). You could just write a .bat file (batch script) to run 'del' commands to which you point a shortcut and/or add as a scheduled event, but you'll need to get fancy with script logic if you want to delete files over an age threshold (which I've done in the past for other cleanup duties). You can always delete the temp files yourself. Better to ensure they aren't inuse at the time; else, you could yank them away from a running process which could have detrimental side effects. You'll get an error when trying to delete inuse files. If you can never delete the files (something always has them locked), you can try a couple solutions: If the file is locked by explorer.exe: (1) Open a command prompt with admin privileges. (2) Open Task Manager, and kill all explorer.exe processes (you can also do this in a batch file using "taskkill /im explorer.exe /f"). The desktop disappears because explorer.exe is both the file manager and the desktop manager. (3) Use the command shell to navigate to the folder, and delete the files. (4) Use Task Manager's File -> New Task menu to run "explorer.exe". The desktop reappears; however, some systray icons may be missing which won't reappear until you logout and login to your Windows account. I use a batch script to perform the above to first test if explorer.exe has a lock on a file. Kill explorer.exe (all instances), try to delete the file(s), and reload explorer.exe. If something else has a lock on the file, you don't want to bother using 'handle' to find out what has the lock to kill it, and a reboot is okay to delete the file(s), use a unlock tool, like Lockhunter or Unlocker. I used Unlocker for a long time, but encountered problems with it the Lockhunter didn't have. Too long ago to remember how Unlocker was failing back then. https://lockhunter.com/ https://www.majorgeeks.com/files/details/unlocker.html Be careful with the install of Unlocker as it comes bundled with unwanted extras (presented during the install which you won't see if you disconnect from the network before running the installer). Be sure to elect a custom install whenever offered, so you decide what to install. Both of these, and other similar tools, work on an age-old registry hack that has been available since, I believe, Windows 9x. Files are added to a PendingFileRenameOperations registry key: if just a file is listed, it gets deleted; if a source and destination file are listed per entry, the file is either renamed or moved. On bootup, if Windows finds this registry key defined, it does the deletes, renames, or moves hopefully before any process creates a lock on the file(s). You can try to have Lockhunter or Unlocker delete a file without a reboot, but if they cannot then they have to add to the registry key, and a later reboot of Windows will commit the actions.
Back to alt.comp.os.windows-10 | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Windows %TEMP% folder & files Jim Dell <Jim.Dell@gmail.com> - 2025-02-26 09:12 -0500
Re: Windows %TEMP% folder & files "R.Wieser" <address@is.invalid> - 2025-02-26 16:51 +0100
Re: Windows %TEMP% folder & files Paul <nospam@needed.invalid> - 2025-02-26 12:53 -0500
Re: Windows %TEMP% folder & files "Carlos E.R." <robin_listas@es.invalid> - 2025-02-26 19:29 +0100
Re: Windows %TEMP% folder & files Frank Slootweg <this@ddress.is.invalid> - 2025-02-26 20:46 +0000
Re: Windows %TEMP% folder & files Ed Cryer <ed@somewhere.in.the.uk> - 2025-02-26 21:15 +0000
Re: Windows %TEMP% folder & files Newyana2 <newyana@invalid.nospam> - 2025-02-26 20:06 -0500
Re: Windows %TEMP% folder & files Paul <nospam@needed.invalid> - 2025-02-26 21:09 -0500
Re: Windows %TEMP% folder & files Ed Cryer <ed@somewhere.in.the.uk> - 2025-02-27 11:15 +0000
Re: Windows %TEMP% folder & files Newyana2 <newyana@invalid.nospam> - 2025-02-27 07:34 -0500
Re: Windows %TEMP% folder & files Ed Cryer <ed@somewhere.in.the.uk> - 2025-02-27 19:00 +0000
Re: Windows %TEMP% folder & files Newyana2 <newyana@invalid.nospam> - 2025-02-27 16:54 -0500
Re: Windows %TEMP% folder & files Ed Cryer <ed@somewhere.in.the.uk> - 2025-02-27 22:54 +0000
Re: Windows %TEMP% folder & files Frank Slootweg <this@ddress.is.invalid> - 2025-03-01 15:29 +0000
Re: Windows %TEMP% folder & files VanguardLH <V@nguard.LH> - 2025-02-26 16:06 -0600
Re: Windows %TEMP% folder & files Frank Slootweg <this@ddress.is.invalid> - 2025-02-27 13:29 +0000
Re: Windows %TEMP% folder & files Anssi Saari <anssi.saari@usenet.mail.kapsi.fi> - 2025-02-27 12:37 +0200
Re: Windows %TEMP% folder & files Char Jackson <none@none.invalid> - 2025-02-26 17:57 -0600
Re: Windows %TEMP% folder & files John <Man@the.keyboard> - 2025-02-27 12:01 +0000
Re: Windows %TEMP% folder & files Zaidy036 <Zaidy036@air.isp.spam> - 2025-02-26 19:20 -0500
Re: Windows %TEMP% folder & files Newyana2 <newyana@invalid.nospam> - 2025-02-26 13:42 -0500
Re: Windows %TEMP% folder & files VanguardLH <V@nguard.LH> - 2025-02-26 13:55 -0600
Re: Windows %TEMP% folder & files VanguardLH <V@nguard.LH> - 2025-02-26 14:23 -0600
Re: Windows %TEMP% folder & files John <Man@the.keyboard> - 2025-02-27 11:47 +0000
Re: Windows %TEMP% folder & files Jim Dell <Jim.Dell@gmail.com> - 2025-02-27 08:49 -0500
Re: Windows %TEMP% folder & files Frank Slootweg <this@ddress.is.invalid> - 2025-02-27 15:00 +0000
Re: Windows %TEMP% folder & files Jim Dell <Jim.Dell@gmail.com> - 2025-02-27 08:49 -0500
Re: Windows %TEMP% folder & files "John C." <r9jmg0@yahoo.com> - 2025-02-27 06:43 -0800
Re: Windows %TEMP% folder & files Frank Slootweg <this@ddress.is.invalid> - 2025-02-27 15:31 +0000
Re: Windows %TEMP% folder & files "John C." <r9jmg0@yahoo.com> - 2025-02-28 05:29 -0800
Re: Windows %TEMP% folder & files Paul <nospam@needed.invalid> - 2025-02-28 12:32 -0500
Re: Windows %TEMP% folder & files "John C." <r9jmg0@yahoo.com> - 2025-03-02 06:11 -0800
Re: Windows %TEMP% folder & files VanguardLH <V@nguard.LH> - 2025-02-28 11:39 -0600
Re: Windows %TEMP% folder & files "John C." <r9jmg0@yahoo.com> - 2025-03-02 06:14 -0800
Re: Windows %TEMP% folder & files Frank Slootweg <this@ddress.is.invalid> - 2025-03-02 15:20 +0000
Re: Windows %TEMP% folder & files Paul <nospam@needed.invalid> - 2025-03-02 14:57 -0500
Re: Windows %TEMP% folder & files Frank Slootweg <this@ddress.is.invalid> - 2025-03-02 20:28 +0000
Re: Windows %TEMP% folder & files "John C." <r9jmg0@yahoo.com> - 2025-03-03 06:15 -0800
Re: Windows %TEMP% folder & files VanguardLH <V@nguard.LH> - 2025-03-02 14:44 -0600
Re: Windows %TEMP% folder & files Mr Xi Ji Ping <ping@china.cn> - 2025-02-28 17:39 +0000
Re: Windows %TEMP% folder & files VanguardLH <V@nguard.LH> - 2025-02-28 12:10 -0600
Re: Windows %TEMP% folder & files "John C." <r9jmg0@yahoo.com> - 2025-03-02 06:18 -0800
Re: Windows %TEMP% folder & files Jim Dell <Jim.Dell@gmail.com> - 2025-03-01 19:11 -0500
Re: Windows %TEMP% folder & files John <Man@the.keyboard> - 2025-02-28 23:40 +0000
Re: Windows %TEMP% folder & files Zaidy036 <Zaidy036@air.isp.spam> - 2025-02-27 10:03 -0500
csiph-web