Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > alt.comp.os.windows-10 > #182569 > unrolled thread

Windows %TEMP% folder & files

Started byJim Dell <Jim.Dell@gmail.com>
First post2025-02-26 09:12 -0500
Last post2025-02-27 10:03 -0500
Articles 20 on this page of 45 — 14 participants

Back to article view | Back to alt.comp.os.windows-10


Contents

  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

Page 2 of 3 — ← Prev page 1 [2] 3  Next page →


#182575

FromNewyana2 <newyana@invalid.nospam>
Date2025-02-26 13:42 -0500
Message-ID<vpnn8l$2mb6p$1@dont-email.me>
In reply to#182569
On 2/26/2025 9:12 AM, Jim Dell 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.
> 
> Any help would be appreciated.
> 

   The easy way is to go into Computer, right-click C drive,
click Properties, click disk cleanup. Win10 produces a ridiculous
amount of garbage, but it can mostly be cleaned up there.

   When that's done, open power shell and run this to clean
up winsxs temp files:

Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase

[toc] | [prev] | [next] | [standalone]


#182576

FromVanguardLH <V@nguard.LH>
Date2025-02-26 13:55 -0600
Message-ID<efdmopoyrrpm.dlg@v.nguard.lh>
In reply to#182569
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.

[toc] | [prev] | [next] | [standalone]


#182578

FromVanguardLH <V@nguard.LH>
Date2025-02-26 14:23 -0600
Message-ID<na15ead778ey$.dlg@v.nguard.lh>
In reply to#182576
In place of the 'del' command, you can use robocopy to delete files, and
specify how old before they become eligible.  In a command shell, run:

robocopy /?

That gives all the parameters you can use with robocopy.  Use the
/minage:N parameter to specify how old is a file to be eligible for
action.  N can either specify the number of days, like 1 for 1 day-old
files, or a date in YYYYMMDD format.

robocopy is for, well, copying/moving, so it doesn't have a delete
parameter.  Instead have the batch script create a temporary holding
folder, like c:\robotemp, have robocopy move (/move) the eligible files
into that folder, then the batch script runs 'rmdir /s /q c:\robotemp'
to delete the holding folder.

Note robocopy does not use shadow copies (VSC: Volume Shadow Copy
service), so it cannot act on locked files.  Even CCleaner doesn't
support VSC.  That's why I mentioned Lockhunter and Unlocker to get rid
of stubborn locked files, but those aren't guaranteed to delete all
files on every attempt.  There are tools that are file managers that do
support VSC, like VSSCopy, but that is geared to copying locked files,
not to delete them.  There are command to create, manage, and delete
shadow copies that will work with robocopy, but then your intent is to
delete the locked files, not to save copies elsewhere (that you then
delete from elsewhere, not from the original folder).  Either just let
robocopy fail on the locked files, and you know something had them
locked, so they probably should not get deleted, or use Lockhunter,
Unlocker, or similar tool to delete the stubborn file(s).

The default timeouts for robocopy are insanely long.  If a file is
inuse, and robocopy cannot access it, it keeps retrying for a very long
time which would make the command or batch script take a very long time
to finish.  Defaults are:

/r:1000000 (one million retries)
/w:30      (30 seconds per retry)

Those settings would have robocopy trying to act on a file for up over
347 years, and that's for EACH matched file.  Change those to more sane
values, like /r:6 and /w:10, so robocopy would give up after 1 minute.

[toc] | [prev] | [next] | [standalone]


#182590

FromJohn <Man@the.keyboard>
Date2025-02-27 11:47 +0000
Message-ID<ifh0sj1b5q4qd1f0j73e2dvagbl7b1jj9f@4ax.com>
In reply to#182569
On Wed, 26 Feb 2025 09:12:32 -0500, 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.
>
>Any help would be appreciated.

 Holee Fook!

 "2388 File(s)  2,093,232,224 bytes 1027 Dir(s)"

 Uhhhmm. Them is a *lot* of temporary files. Thank you for that. :)

 Win-7, 2013 desktop unit with 3 TB of spinny disk. I'm not unduly
worried about running out of space for the Temp files because:
"338,085,076,992 bytes free" on the C: partition. 

 Apparently, I have several old VLC*.exe downloads lying around. Those
are 22 MB each. VLC isn't a tidy creature. I binned them all. Nothing
horrible happened. Binning temporary files usually doesn't break much
if anything. Mostly. Usually. Sometimes. 

 I think I should "dir %TEMP% > Temp-file.txt" just so I can look at
it later. Probably much, much later. 

 Hmmmm, you do know that "C:\Users\YourUserName\AppData\Local\Temp" is
not the only place that hides, secretes and sequesters temporary
files? They are dumped all over the place. 

 Also, there may be other "Users" on your system. I have one called
"BOINC-User", for example. 

 But thanks for prompting me to look at this. It was sort of fun. :)

                                                       J. 
 

>
>Jim

[toc] | [prev] | [next] | [standalone]


#182594

FromJim Dell <Jim.Dell@gmail.com>
Date2025-02-27 08:49 -0500
Message-ID<2728327b-d05e-1d8d-16e8-fd225c2e49ff@gmail.com>
In reply to#182590
John wrote:
> On Wed, 26 Feb 2025 09:12:32 -0500, 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.
>>
>> Any help would be appreciated.
> 
>   Holee Fook!
> 
>   "2388 File(s)  2,093,232,224 bytes 1027 Dir(s)"
> 
>   Uhhhmm. Them is a *lot* of temporary files. Thank you for that. :)
> 
>   Win-7, 2013 desktop unit with 3 TB of spinny disk. I'm not unduly
> worried about running out of space for the Temp files because:
> "338,085,076,992 bytes free" on the C: partition.
> 
>   Apparently, I have several old VLC*.exe downloads lying around. Those
> are 22 MB each. VLC isn't a tidy creature. I binned them all. Nothing
> horrible happened. Binning temporary files usually doesn't break much
> if anything. Mostly. Usually. Sometimes.
> 
>   I think I should "dir %TEMP% > Temp-file.txt" just so I can look at
> it later. Probably much, much later.
> 
>   Hmmmm, you do know that "C:\Users\YourUserName\AppData\Local\Temp" is
> not the only place that hides, secretes and sequesters temporary
> files? They are dumped all over the place.
> 
>   Also, there may be other "Users" on your system. I have one called
> "BOINC-User", for example.
> 
>   But thanks for prompting me to look at this. It was sort of fun. :)
> 
>                                                         J.
>   
> 
>>
>> Jim
Thanks for all the suggestions
I have written a batch file that deletes all the folders & Files under 
%TEMP%
I don't have Opera browser installed, so it's not the cause of the 
scoped folders

Jim

[toc] | [prev] | [next] | [standalone]


#182600

FromFrank Slootweg <this@ddress.is.invalid>
Date2025-02-27 15:00 +0000
Message-ID<vpq25k.2go.1@ID-201911.user.individual.net>
In reply to#182594
Jim Dell <Jim.Dell@gmail.com> wrote:
[...]
> Thanks for all the suggestions
> I have written a batch file that deletes all the folders & Files under 
> %TEMP%
> I don't have Opera browser installed, so it's not the cause of the 
> scoped folders

  You're of course free to use your batch file, but see VanguardLH's
response [1] and my response to it [2], which explains that Windows
already cleans the %TEMP% folder if you tick [3] a tickmark in Settings.

[1] Message-ID: <sfiuwyjydahk$.dlg@v.nguard.lh>

[2] Message-ID: <vppss0.ddo.1@ID-201911.user.individual.net>

[3] On my (Windows 11) system the tickmark was ticked by default.

[toc] | [prev] | [next] | [standalone]


#182595

FromJim Dell <Jim.Dell@gmail.com>
Date2025-02-27 08:49 -0500
Message-ID<vppqhm$34p30$1@dont-email.me>
In reply to#182590
John wrote:
> On Wed, 26 Feb 2025 09:12:32 -0500, 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.
>>
>> Any help would be appreciated.
> 
>   Holee Fook!
> 
>   "2388 File(s)  2,093,232,224 bytes 1027 Dir(s)"
> 
>   Uhhhmm. Them is a *lot* of temporary files. Thank you for that. :)
> 
>   Win-7, 2013 desktop unit with 3 TB of spinny disk. I'm not unduly
> worried about running out of space for the Temp files because:
> "338,085,076,992 bytes free" on the C: partition.
> 
>   Apparently, I have several old VLC*.exe downloads lying around. Those
> are 22 MB each. VLC isn't a tidy creature. I binned them all. Nothing
> horrible happened. Binning temporary files usually doesn't break much
> if anything. Mostly. Usually. Sometimes.
> 
>   I think I should "dir %TEMP% > Temp-file.txt" just so I can look at
> it later. Probably much, much later.
> 
>   Hmmmm, you do know that "C:\Users\YourUserName\AppData\Local\Temp" is
> not the only place that hides, secretes and sequesters temporary
> files? They are dumped all over the place.
> 
>   Also, there may be other "Users" on your system. I have one called
> "BOINC-User", for example.
> 
>   But thanks for prompting me to look at this. It was sort of fun. :)
> 
>                                                         J.
>   
> 
>>
>> Jim
Thanks for all the suggestions
I have written a batch file that deletes all the folders & Files under 
%TEMP%
I don't have Opera browser installed, so it's not the cause of the 
scoped folders

Jim

[toc] | [prev] | [next] | [standalone]


#182599

From"John C." <r9jmg0@yahoo.com>
Date2025-02-27 06:43 -0800
Message-ID<vpptmt$350ck$4@dont-email.me>
In reply to#182569
Jim Dell 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.
> 
> Any help would be appreciated.
> 
> Jim

Here's what I do on a regular basis:

1. Open the c:\windows\temp folder in File Explorer
2. Click on any file in the right hand pane to select it
3. Press Control-A to select everything in the c:\windows\temp folder
4. Press the Delete key

Some files may refuse to be deleted if your system has crashed at any
point, but the vast majority of the files will go to your Recycle Bin.

5. Right click on your Recycle Bin
6. Select "Empty Recycle Bin"

I would try to find out what's causing the Temp folder to get flooded
with those "HeadlessChrome" folders. Sound like something that Google
Chrome is creating, if you have Google Chrome installed.

I've never used Google Chrome -hated it from when I first heard about
it- so I couldn't tell you if that's the source.

-- 
John C.

Take back Microsoft from India.

[toc] | [prev] | [next] | [standalone]


#182603

FromFrank Slootweg <this@ddress.is.invalid>
Date2025-02-27 15:31 +0000
Message-ID<vpq3v5.11dg.1@ID-201911.user.individual.net>
In reply to#182599
John C. <r9jmg0@yahoo.com> wrote:

> Here's what I do on a regular basis:
> 
> 1. Open the c:\windows\temp folder in File Explorer
> 2. Click on any file in the right hand pane to select it
> 3. Press Control-A to select everything in the c:\windows\temp folder
> 4. Press the Delete key
> 
> Some files may refuse to be deleted if your system has crashed at any
> point, but the vast majority of the files will go to your Recycle Bin.
> 
> 5. Right click on your Recycle Bin
> 6. Select "Empty Recycle Bin"

  Note that the OP's (Jim Dell) issue is about the %TEMP% folder, not
about C:\Windows\Temp.

  That said, the automatic cleaning of %TEMP% which VanguardLH mentioned
[1], *also* cleans C:\Windows\Temp, so while anybody is of course
free to do it themselves/manually, I think there is no real reason.

  I hate to bring it to you, but Windows is not *all* bad! :-)

[1] See my pointers to VanguardLH's and my responses in
Message-ID: <vpq25k.2go.1@ID-201911.user.individual.net>

[toc] | [prev] | [next] | [standalone]


#182626

From"John C." <r9jmg0@yahoo.com>
Date2025-02-28 05:29 -0800
Message-ID<vpsdmt$3m2rg$2@dont-email.me>
In reply to#182603
Frank Slootweg wrote:
> John C. wrote:
>> 
>> Here's what I do on a regular basis:
>>
>> 1. Open the c:\windows\temp folder in File Explorer
>> 2. Click on any file in the right hand pane to select it
>> 3. Press Control-A to select everything in the c:\windows\temp folder
>> 4. Press the Delete key
>>
>> Some files may refuse to be deleted if your system has crashed at any
>> point, but the vast majority of the files will go to your Recycle Bin.
>>
>> 5. Right click on your Recycle Bin
>> 6. Select "Empty Recycle Bin"
> 
>   Note that the OP's (Jim Dell) issue is about the %TEMP% folder, not
> about C:\Windows\Temp.

Thanks. And I guess that means he meant a C:\WINDOWS\system32\%TEMP%
folder or C:\WINDOWS\system32\TEMP folder.

I have only a c:\windows\temp folder in the Windows folder.

>   That said, the automatic cleaning of %TEMP% which VanguardLH mentioned
> [1], *also* cleans C:\Windows\Temp, so while anybody is of course
> free to do it themselves/manually, I think there is no real reason.
> 
>   I hate to bring it to you, but Windows is not *all* bad! :-)
> 
> [1] See my pointers to VanguardLH's and my responses in
> Message-ID: <vpq25k.2go.1@ID-201911.user.individual.net>

When I run “dir %TEMP%” in Powershell, I get:
_________________________________________________________________________________
dir : Cannot find path 'C:\WINDOWS\system32\%TEMP%' because it does not
exist.
At line:1 char:1
+ dir %TEMP%
+ ~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound:
(C:\WINDOWS\system32\%TEMP%:String) [Get-ChildItem], ItemNotFoundExcepti
   on
    + FullyQualifiedErrorId :
PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
_________________________________________________________________________________

If Jim was talking about the temp folder here:

Users\[Your Username]\AppData\Local\Temp

I regularly clean it the same way that I do the temp folder in the
Windows folder.

-- 
John C.

Take back Microsoft from India.

[toc] | [prev] | [next] | [standalone]


#182629

FromPaul <nospam@needed.invalid>
Date2025-02-28 12:32 -0500
Message-ID<vpss0a$3p084$1@dont-email.me>
In reply to#182626
On Fri, 2/28/2025 8:29 AM, John C. wrote:
> Frank Slootweg wrote:
>> John C. wrote:
>>>
>>> Here's what I do on a regular basis:
>>>
>>> 1. Open the c:\windows\temp folder in File Explorer
>>> 2. Click on any file in the right hand pane to select it
>>> 3. Press Control-A to select everything in the c:\windows\temp folder
>>> 4. Press the Delete key
>>>
>>> Some files may refuse to be deleted if your system has crashed at any
>>> point, but the vast majority of the files will go to your Recycle Bin.
>>>
>>> 5. Right click on your Recycle Bin
>>> 6. Select "Empty Recycle Bin"
>>
>>   Note that the OP's (Jim Dell) issue is about the %TEMP% folder, not
>> about C:\Windows\Temp.
> 
> Thanks. And I guess that means he meant a C:\WINDOWS\system32\%TEMP%
> folder or C:\WINDOWS\system32\TEMP folder.
> 
> I have only a c:\windows\temp folder in the Windows folder.
> 
>>   That said, the automatic cleaning of %TEMP% which VanguardLH mentioned
>> [1], *also* cleans C:\Windows\Temp, so while anybody is of course
>> free to do it themselves/manually, I think there is no real reason.
>>
>>   I hate to bring it to you, but Windows is not *all* bad! :-)
>>
>> [1] See my pointers to VanguardLH's and my responses in
>> Message-ID: <vpq25k.2go.1@ID-201911.user.individual.net>
> 
> When I run “dir %TEMP%” in Powershell, I get:
> _________________________________________________________________________________
> dir : Cannot find path 'C:\WINDOWS\system32\%TEMP%' because it does not
> exist.
> At line:1 char:1
> + dir %TEMP%
> + ~~~~~~~~~~
>     + CategoryInfo          : ObjectNotFound:
> (C:\WINDOWS\system32\%TEMP%:String) [Get-ChildItem], ItemNotFoundExcepti
>    on
>     + FullyQualifiedErrorId :
> PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
> _________________________________________________________________________________
> 
> If Jim was talking about the temp folder here:
> 
> Users\[Your Username]\AppData\Local\Temp
> 
> I regularly clean it the same way that I do the temp folder in the
> Windows folder.
> 

Well, you're not supposed to run anything in Powershell, now are you :-)

%temp% can be parsed by the Command Prompt shell.
That does not mean Powershell will accept it.

After a web page filled with suggestions didn't work
for Powershell, I tried this:

   echo $env:temp

See if that works.

Or you could try

   cd $env:temp

  Paul

[toc] | [prev] | [next] | [standalone]


#182715

From"John C." <r9jmg0@yahoo.com>
Date2025-03-02 06:11 -0800
Message-ID<vq1oud$pv5p$6@dont-email.me>
In reply to#182629
Paul wrote:
> John C. wrote:
>> Frank Slootweg wrote:
>>> John C. wrote:
>>>>
>>>> Here's what I do on a regular basis:
>>>>
>>>> 1. Open the c:\windows\temp folder in File Explorer
>>>> 2. Click on any file in the right hand pane to select it
>>>> 3. Press Control-A to select everything in the c:\windows\temp folder
>>>> 4. Press the Delete key
>>>>
>>>> Some files may refuse to be deleted if your system has crashed at any
>>>> point, but the vast majority of the files will go to your Recycle Bin.
>>>>
>>>> 5. Right click on your Recycle Bin
>>>> 6. Select "Empty Recycle Bin"
>>>
>>>   Note that the OP's (Jim Dell) issue is about the %TEMP% folder, not
>>> about C:\Windows\Temp.
>>
>> Thanks. And I guess that means he meant a C:\WINDOWS\system32\%TEMP%
>> folder or C:\WINDOWS\system32\TEMP folder.
>>
>> I have only a c:\windows\temp folder in the Windows folder.
>>
>>>   That said, the automatic cleaning of %TEMP% which VanguardLH mentioned
>>> [1], *also* cleans C:\Windows\Temp, so while anybody is of course
>>> free to do it themselves/manually, I think there is no real reason.
>>>
>>>   I hate to bring it to you, but Windows is not *all* bad! :-)
>>>
>>> [1] See my pointers to VanguardLH's and my responses in
>>> Message-ID: <vpq25k.2go.1@ID-201911.user.individual.net>
>>
>> When I run “dir %TEMP%” in Powershell, I get:
>> _________________________________________________________________________________
>> dir : Cannot find path 'C:\WINDOWS\system32\%TEMP%' because it does not
>> exist.
>> At line:1 char:1
>> + dir %TEMP%
>> + ~~~~~~~~~~
>>     + CategoryInfo          : ObjectNotFound:
>> (C:\WINDOWS\system32\%TEMP%:String) [Get-ChildItem], ItemNotFoundExcepti
>>    on
>>     + FullyQualifiedErrorId :
>> PathNotFound,Microsoft.PowerShell.Commands.GetChildItemCommand
>> _________________________________________________________________________________
>>
>> If Jim was talking about the temp folder here:
>>
>> Users\[Your Username]\AppData\Local\Temp
>>
>> I regularly clean it the same way that I do the temp folder in the
>> Windows folder.
>>
> 
> Well, you're not supposed to run anything in Powershell, now are you :-)

I just ran the command in a regular command prompt window and it worked
fine. Maybe MS fakes being unable to find the temp folder when
Powershell is used. I don't know.

> %temp% can be parsed by the Command Prompt shell.
> That does not mean Powershell will accept it.

Yes, that seems to be the case.

> After a web page filled with suggestions didn't work
> for Powershell, I tried this:
> 
>    echo $env:temp
> 
> See if that works.

That shows the folder but it doesn't list its contents.

> Or you could try
> 
>    cd $env:temp

Changes folders to the temp folder but again, doesn't list the contents.
However, a list of the contents was never the goal

Thanks for the info, Paul.

-- 
John C.

Take back Microsoft from India.

[toc] | [prev] | [next] | [standalone]


#182630

FromVanguardLH <V@nguard.LH>
Date2025-02-28 11:39 -0600
Message-ID<uln8izwjp3e6.dlg@v.nguard.lh>
In reply to#182626
"John C." <r9jmg0@yahoo.com> wrote:

> When I run “dir %TEMP%” in Powershell, I get:
>
> dir : Cannot find path 'C:\WINDOWS\system32\%TEMP%' because it does not
> exist.

As a script interpreter, Powershell uses its own command set, like
Get-Children, instead of the DOS commands in the DOS command interpreter
(cmd.exe), like dir.  Powershell does have some aliases on DOS commands,
like dir.  Powershell isn't a more robust command interpreter.  It is a
script processor that is tied into .NET [Framework].

https://en.wikipedia.org/wiki/PowerShell

While Powershell and cmd both use console windows to load command shells
in which to execute inputted commands and display stdout, they are very
different animals: one is a domestic cat that runs from dogs while the
other is a jaguar that will take on crocodiles.  I've had little use for
Powershell other than occasionally to do a command that is not available
in cmd.exe, run scripts that would never be possible in batch scripts
using cmd.exe, or to exercise system functions that are obtuse or
missing from other system utilities.

As such, Powershell operates differently on DOS environment variables.
For example, instead of using the DOS command 'set varname=varvalue", in
Powershell you use $Env:varname = 'varvalue'.

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.5

Unless you're willing to spend the effort and time to learn a new
scripting & system interpreter language, stay away from Powershell.
Learning it is tantamount to learning a new programming language, like
Perl, Javascript, Python, VBA, PHP, ,etc.  Just use a DOS shell via
cmd.exe to run the commands and use the syntax to which you are
accustomed.  

Load cmd.exe to open a console window in which the command shell
operates, and then issue your DOS commands.  Stick with what you know,
or spend time learning Powershell which can take a very long time
considering how vast are its features since Powershell is built on .NET
CLR (Common Language Runtime) where all inputs and outputs are .NET
objects.  I'm guessing you don't want to learn .NET nor Powershell.
Learning Powershell is on my to-do list, and I even have a wishlist of
books at my local public library on learning Powershell, but I never
manage to get the time nor motivation to delve much into it.

If you don't want to read books or online tutorials on Powershell to
learn it, go through all the tribulation of testing its use, and spend
time in forums or newsgroups trying to get help, you can find classes on
Powershell.  IT folks who are newsbies to Powershell take 2 weeks to
learn an intro to /some/ of Powershell, mostly to facilitate their
sysadmin tasks.  Most impetus to learn Powershell is by those interested
in the realm of system administration.  Of course, to newbies even DOS
commands are a chore to learn, and then discover their anomalies.

[toc] | [prev] | [next] | [standalone]


#182716

From"John C." <r9jmg0@yahoo.com>
Date2025-03-02 06:14 -0800
Message-ID<vq1p3v$pv5p$7@dont-email.me>
In reply to#182630
On 25/02/28 09:39 AM, VanguardLH wrote:
> "John C." <r9jmg0@yahoo.com> wrote:
> 
>> When I run “dir %TEMP%” in Powershell, I get:
>>
>> dir : Cannot find path 'C:\WINDOWS\system32\%TEMP%' because it does not
>> exist.
> 
> As a script interpreter, Powershell uses its own command set, like
> Get-Children, instead of the DOS commands in the DOS command interpreter
> (cmd.exe), like dir.  Powershell does have some aliases on DOS commands,
> like dir.  Powershell isn't a more robust command interpreter.  It is a
> script processor that is tied into .NET [Framework].
> 
> https://en.wikipedia.org/wiki/PowerShell
> 
> While Powershell and cmd both use console windows to load command shells
> in which to execute inputted commands and display stdout, they are very
> different animals: one is a domestic cat that runs from dogs while the
> other is a jaguar that will take on crocodiles.  I've had little use for
> Powershell other than occasionally to do a command that is not available
> in cmd.exe, run scripts that would never be possible in batch scripts
> using cmd.exe, or to exercise system functions that are obtuse or
> missing from other system utilities.
> 
> As such, Powershell operates differently on DOS environment variables.
> For example, instead of using the DOS command 'set varname=varvalue", in
> Powershell you use $Env:varname = 'varvalue'.
> 
> https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_environment_variables?view=powershell-7.5
> 
> Unless you're willing to spend the effort and time to learn a new
> scripting & system interpreter language, stay away from Powershell.
> Learning it is tantamount to learning a new programming language, like
> Perl, Javascript, Python, VBA, PHP, ,etc.  Just use a DOS shell via
> cmd.exe to run the commands and use the syntax to which you are
> accustomed.  
> 
> Load cmd.exe to open a console window in which the command shell
> operates, and then issue your DOS commands.  Stick with what you know,
> or spend time learning Powershell which can take a very long time
> considering how vast are its features since Powershell is built on .NET
> CLR (Common Language Runtime) where all inputs and outputs are .NET
> objects.  I'm guessing you don't want to learn .NET nor Powershell.
> Learning Powershell is on my to-do list, and I even have a wishlist of
> books at my local public library on learning Powershell, but I never
> manage to get the time nor motivation to delve much into it.
> 
> If you don't want to read books or online tutorials on Powershell to
> learn it, go through all the tribulation of testing its use, and spend
> time in forums or newsgroups trying to get help, you can find classes on
> Powershell.  IT folks who are newsbies to Powershell take 2 weeks to
> learn an intro to /some/ of Powershell, mostly to facilitate their
> sysadmin tasks.  Most impetus to learn Powershell is by those interested
> in the realm of system administration.  Of course, to newbies even DOS
> commands are a chore to learn, and then discover their anomalies.

Wow. Thanks for that, VanguardLH. Good info. The main reason I've been
using Powershell is because I'm able to copy and paste commands into it.
I still use the regular command prompt too though.

-- 
John C.

Take back Microsoft from India.

[toc] | [prev] | [next] | [standalone]


#182719

FromFrank Slootweg <this@ddress.is.invalid>
Date2025-03-02 15:20 +0000
Message-ID<vq20fg.cug.1@ID-201911.user.individual.net>
In reply to#182716
John C. <r9jmg0@yahoo.com> wrote:
[...]

> Wow. Thanks for that, VanguardLH. Good info. The main reason I've been
> using Powershell is because I'm able to copy and paste commands into it.
> I still use the regular command prompt too though.

  You can also copy and paste in a Command Prompt window. Right-click
the upper-left icon, select Properties and on the Options tab tick the
'QuickEdit Mode' setting. You now can copy by selecting a piece of text
and pressing the 'enter' key. Paste is by right-click.

  There's also 'Use Ctrl+Shift+C/V as Copy/Paste', but since the
'QuickEdit Mode' method exists since eons (XP? Vista?), I can't be
bothered to use more keys to do the same thing.

[toc] | [prev] | [next] | [standalone]


#182720

FromPaul <nospam@needed.invalid>
Date2025-03-02 14:57 -0500
Message-ID<vq2d72$tu5b$1@dont-email.me>
In reply to#182719
On Sun, 3/2/2025 10:20 AM, Frank Slootweg wrote:
> John C. <r9jmg0@yahoo.com> wrote:
> [...]
> 
>> Wow. Thanks for that, VanguardLH. Good info. The main reason I've been
>> using Powershell is because I'm able to copy and paste commands into it.
>> I still use the regular command prompt too though.
> 
>   You can also copy and paste in a Command Prompt window. Right-click
> the upper-left icon, select Properties and on the Options tab tick the
> 'QuickEdit Mode' setting. You now can copy by selecting a piece of text
> and pressing the 'enter' key. Paste is by right-click.
> 
>   There's also 'Use Ctrl+Shift+C/V as Copy/Paste', but since the
> 'QuickEdit Mode' method exists since eons (XP? Vista?), I can't be
> bothered to use more keys to do the same thing.
> 

There is also a scheme in the Terminal window consisting of:

  1) Wipe over text to select.
  2) Right-click one time, specifies "Copy"
  3) Right-click a second time, specifies "Paste".

That's the basic idea at least, and that is pretty handy.

The Terminal (at least in Powershell) supports tab-completion
like it was "tcsh". You can type the beginning of an applet name
and tap the tab key, and for each tab press, it will cycle through
the matches it can find. It can also sometimes cycle through
parameters for a command, using the tab key.

   Paul

[toc] | [prev] | [next] | [standalone]


#182722

FromFrank Slootweg <this@ddress.is.invalid>
Date2025-03-02 20:28 +0000
Message-ID<vq2ih3.15ug.1@ID-201911.user.individual.net>
In reply to#182720
Paul <nospam@needed.invalid> wrote:
> On Sun, 3/2/2025 10:20 AM, Frank Slootweg wrote:
> > John C. <r9jmg0@yahoo.com> wrote:
> > [...]
> > 
> >> Wow. Thanks for that, VanguardLH. Good info. The main reason I've been
> >> using Powershell is because I'm able to copy and paste commands into it.
> >> I still use the regular command prompt too though.
> > 
> >   You can also copy and paste in a Command Prompt window. Right-click
> > the upper-left icon, select Properties and on the Options tab tick the
> > 'QuickEdit Mode' setting. You now can copy by selecting a piece of text
> > and pressing the 'enter' key. Paste is by right-click.
> > 
> >   There's also 'Use Ctrl+Shift+C/V as Copy/Paste', but since the
> > 'QuickEdit Mode' method exists since eons (XP? Vista?), I can't be
> > bothered to use more keys to do the same thing.
> > 
> 
> There is also a scheme in the Terminal window consisting of:

  Does Windows 10 also have 'Windows Terminal'? (It came with 22H2 on
Windows 11. I'm on Windows 11.)

  Anyway, my comments were for a 'Windows Console Host' window, running
cmd.exe aka 'Command Prompt'.

>   1) Wipe over text to select.
>   2) Right-click one time, specifies "Copy"
>   3) Right-click a second time, specifies "Paste".
> 
> That's the basic idea at least, and that is pretty handy.

  Thanks for that! That also works for a 'Windows Console Host' window,
running cmd.exe.

  So that gives at least three different ways to copy and paste in a
Command Prompt window.

[...]

[toc] | [prev] | [next] | [standalone]


#182741

From"John C." <r9jmg0@yahoo.com>
Date2025-03-03 06:15 -0800
Message-ID<vq4dim$1b1io$1@dont-email.me>
In reply to#182719
Frank Slootweg wrote:
> John C. wrote:
> [...]
> 
>> Wow. Thanks for that, VanguardLH. Good info. The main reason I've been
>> using Powershell is because I'm able to copy and paste commands into it.
>> I still use the regular command prompt too though.
> 
>   You can also copy and paste in a Command Prompt window. Right-click
> the upper-left icon, select Properties and on the Options tab tick the
> 'QuickEdit Mode' setting. You now can copy by selecting a piece of text
> and pressing the 'enter' key. Paste is by right-click.
> 
>   There's also 'Use Ctrl+Shift+C/V as Copy/Paste', but since the
> 'QuickEdit Mode' method exists since eons (XP? Vista?), I can't be
> bothered to use more keys to do the same thing.

Never would have found that. Thanks, Frank.

-- 
John C.

Take back Microsoft from India.

[toc] | [prev] | [next] | [standalone]


#182724

FromVanguardLH <V@nguard.LH>
Date2025-03-02 14:44 -0600
Message-ID<1qz0tqlpwjjxc$.dlg@v.nguard.lh>
In reply to#182716
"John C." <r9jmg0@yahoo.com> wrote:

> Wow. Thanks for that, VanguardLH. Good info. The main reason I've been
> using Powershell is because I'm able to copy and paste commands into it.
> I still use the regular command prompt too though.

Copy/paste is also in the shell for cmd.exe.  After running cmd.exe to
see its console window, click in the top left corner of the titlebar
(where used to be the Control menu), or left-click on the titlebar, or
use Alt+Spacebar, to see its control menu.  Select Properties, and look
under the Options tab.  Ensure both QuickEdit and Ctrl keys options are
enabled.

To check copy/paste is enabled, drag the mouse cursor over a line of
output in the console window to highlight it, and hit Ctrl+C to copy.
You'll hear a beep, and the highlighting disappears.  In Notepad, or any
app with a clipboard interface, paste the newly copied text.  In fact,
at the command prompt, hit Ctrl+V to paste inside the cmd.exe shell's
console window.

Frank also hit on the same method in his reply.  As he mentioned, the
shell has had copy/paste for so long that I can't remember when it was
added.  Using Google search with its time range criteria, I did a search
on "cmd.exe quickedit".  Didn't get any hits until I used a timerange of
1/1/2005 to 1/1/2006.  Possibly a different search would find earlier
hits.  One hit was:

https://blog.codinghorror.com/stupid-command-prompt-tricks/

That guy was talking about Windows XP which was released in 2001.  Looks
like QuickEdit has been around for 24 years, maybe longer.

Here are some videos on copy/paste in a command shell since reading
instructions can sometimes be confusing.

https://www.youtube.com/watch?v=kISsbO0C0Gg
https://www.youtube.com/watch?v=Xp-DOEii02c

[toc] | [prev] | [next] | [standalone]


#182631

FromMr Xi Ji Ping <ping@china.cn>
Date2025-02-28 17:39 +0000
Message-ID<vpssi3$btja$1@paganini.bofh.team>
In reply to#182626
On 28/02/2025 13:29, John C. wrote:
> When I run “dir %TEMP%” in Powershell, I get:

You don't run anything to search for the folder. You simply type 
"%TEMP%" in the search box and the folder will open for you automatically.

Have you got a Search box in the taskbar or have you removed it because 
Indians were spying on you? Please advise.

[toc] | [prev] | [next] | [standalone]


Page 2 of 3 — ← Prev page 1 [2] 3  Next page →

Back to top | Article view | alt.comp.os.windows-10


csiph-web