Files disappear from folder

Page 2 of 2 FirstFirst 12

  1. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #11

    dalchina said:
    If the folder has been created by some program, it may be that that program has made use of it and deleted them.
    I agree.
      My Computer


  2. Posts : 36
    Windows 10 Pro 64-bit
    Thread Starter
       #12

    Files disappear from folder


    Malware? I doubt if a bona fide program would delete files without sending them to the recycle bin.
    I will have to keep an eye on things on the suspicion that I have a malware infection.
      My Computer


  3. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #13

    Hello @jsampson45,

    I carried on investigating this for you.

    TMP is exactly the same as TEMP as far as the Path [ Folder ] is concerned, and appears to be left over from Win Vista and Win 7. Some programs still use or create the TMP folder if it is NOT already present, although this mainly applies to older programs that get downloaded as TEMP is the standard these days.

    In order to prove that BOTH the TMP and TEMP folders exist in the Environment Variables, although the TMP folder does NOT necessarily exist on every ones system. I wrote a Script to list the Environment Variables. The advantage of the Script is that it does NOT cut the end off of the lines of the output, whereas running just the command does.

    Strangely enough, I used the TEMP folder for manipulations.

    The Script will output an Env_Variables.log file on your Desktop. If you have a re-located Desktop, then obviously change the Path accordingly for the OFN variable.

    Copy & Paste the below into the CMD Prompt and press Enter.

    Code:
    
    @echo off
    set "OFN=%UserProfile%\Desktop\Env_Variables.log"
    set "OUT=%Temp%\OUT.log"
    if exist %OFN% (del /f /q %OFN% >nul 2>&1)
    if exist %OUT% (del /f /q %OUT% >nul 2>&1)
    >> %OUT% PowerShell "Get-ChildItem Env:* | Sort-Object Name | Format-Table -Autosize | Out-String -Width 1000"
             findstr /rc:"[^ <Tab>]" %OUT% >> %OFN% & del %OUT%
    echo. & echo ^>Press ANY key to EXIT . . . & pause >nul & Exit

    These are the Environment Variables that I have on my system . . .

    Code:
    
    Name                            Value                                                                                                                                                                                                                                         
    ----                            -----                                                                                                                                                                                                                                         
    ALLUSERSPROFILE                 C:\ProgramData                                                                                                                                                                                                                                
    APPDATA                         C:\Users\System-Admin\AppData\Roaming                                                                                                                                                                                                         
    CommonProgramFiles              C:\Program Files\Common Files                                                                                                                                                                                                                 
    CommonProgramFiles(x86)         C:\Program Files (x86)\Common Files                                                                                                                                                                                                           
    CommonProgramW6432              C:\Program Files\Common Files                                                                                                                                                                                                                 
    COMPUTERNAME                    System-Admin-LT                                                                                                                                                                                                                               
    ComSpec                         C:\Windows\system32\cmd.exe                                                                                                                                                                                                                   
    DriverData                      C:\Windows\System32\Drivers\DriverData                                                                                                                                                                                                        
    FPS_BROWSER_APP_PROFILE_STRING  Internet Explorer                                                                                                                                                                                                                             
    FPS_BROWSER_USER_PROFILE_STRING Default                                                                                                                                                                                                                                       
    HOMEDRIVE                       C:                                                                                                                                                                                                                                            
    HOMEPATH                        \Users\System-Admin                                                                                                                                                                                                                           
    LOCALAPPDATA                    C:\Users\System-Admin\AppData\Local                                                                                                                                                                                                           
    LOGONSERVER                     \\System-Admin-LT                                                                                                                                                                                                                             
    NUMBER_OF_PROCESSORS            2                                                                                                                                                                                                                                             
    OFN                             C:\Users\System-Admin\Desktop\Env_Variables.log                                                                                                                                                                                               
    OneDrive                        C:\Users\System-Admin\OneDrive                                                                                                                                                                                                                
    OS                              Windows_NT                                                                                                                                                                                                                                    
    OUT                             C:\Users\SYSTEM~1\AppData\Local\Temp\OUT.log                                                                                                                                                                                                  
    Path                            C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\AOMEI\AOMEI Backupper\6.5.0;C:\Users\System-Admin\AppData\Local\Microsoft\WindowsApps;
    PATHEXT                         .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC;.CPL                                                                                                                                                                                    
    PROCESSOR_ARCHITECTURE          AMD64                                                                                                                                                                                                                                         
    PROCESSOR_IDENTIFIER            Intel64 Family 6 Model 37 Stepping 5, GenuineIntel                                                                                                                                                                                            
    PROCESSOR_LEVEL                 6                                                                                                                                                                                                                                             
    PROCESSOR_REVISION              2505                                                                                                                                                                                                                                          
    ProgramData                     C:\ProgramData                                                                                                                                                                                                                                
    ProgramFiles                    C:\Program Files                                                                                                                                                                                                                              
    ProgramFiles(x86)               C:\Program Files (x86)                                                                                                                                                                                                                        
    ProgramW6432                    C:\Program Files                                                                                                                                                                                                                              
    PROMPT                          $P$G                                                                                                                                                                                                                                          
    PSModulePath                    C:\Users\System-Admin\Documents\WindowsPowerShell\Modules;C:\Program Files (x86)\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules                                      
    PUBLIC                          C:\Users\Public                                                                                                                                                                                                                               
    SESSIONNAME                     Console                                                                                                                                                                                                                                       
    SystemDrive                     C:                                                                                                                                                                                                                                            
    SystemRoot                      C:\Windows                                                                                                                                                                                                                                    
    TEMP                            C:\Users\SYSTEM~1\AppData\Local\Temp                                                                                                                                                                                                          
    TMP                             C:\Users\SYSTEM~1\AppData\Local\Temp                                                                                                                                                                                                          
    USERDOMAIN                      System-Admin-LT                                                                                                                                                                                                                               
    USERDOMAIN_ROAMINGPROFILE       System-Admin-LT                                                                                                                                                                                                                               
    USERNAME                        System-Admin                                                                                                                                                                                                                                  
    USERPROFILE                     C:\Users\System-Admin                                                                                                                                                                                                                         
    windir                          C:\Windows
    
    
    

    Do you have these two on your system? . . .

    Code:
    
    TEMP                            C:\Users\SYSTEM~1\AppData\Local\Temp                                                                                                                                                                                                          
    TMP                             C:\Users\SYSTEM~1\AppData\Local\Temp

    I really hope this helps as this has taken quite a while to compile for you.
    Last edited by Paul Black; 05 Aug 2022 at 17:09.
      My Computer


  4. Posts : 42,991
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #14

    Paul- just wondering... how does that relate to C:\tmp ?
      My Computers


  5. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #15

    dalchina said:
    Paul- just wondering... how does that relate to C:\tmp ?
    Just to see if the Environment Variables have been attacked in some way or got corrupted.
      My Computer


  6. Posts : 36
    Windows 10 Pro 64-bit
    Thread Starter
       #16

    Files disappear from folder


    [The arrangement for giving replies seems complicated so where this will go I am not sure]
    I have run your script and I see both TEMP and TMP environment variables pointing to a folder Temp at Appdata\Local\
    The log file should be attached to this posting.
    Many thanks for the time you are putting into this matter.
    Kind regards
    John S.
    Files disappear from folder Attached Files
      My Computer


  7. Posts : 5,330
    Windows 11 Pro 64-bit
       #17

    In this video, i will show you the way to restore data using Windows Shadow Copy.



    Here you can download the latest version of ShadowExplorer: ShadowExplorer.com - Downloads
      My Computer


  8. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #18

    Hello @jsampson45,

    jsampson45 said:
    [I have run your script and I see both TEMP and TMP environment variables pointing to a folder Temp at Appdata\Local\
    The log file should be attached to this posting.
    Many thanks for the time you are putting into this matter.
    The .log file looks OK.

    Have you got a System Image with the folder in that you could Mount and retrieve it?
      My Computer


  9. Posts : 36
    Windows 10 Pro 64-bit
    Thread Starter
       #19

    As above?


    Thanks for all the time you have spent on this, but it is more than I would spend. Life is short for both myself and my client so I have worked round the problem. I do not need the files now.
    Now that I know that files disappear I will need to be alert and not use the temp or tmp folders. Lesson learned. I would be interested to know why it happens, but if there is no ready answer I don't want to spend much time on fruitless investigations.
      My Computer


  10. Posts : 18,044
    Win 10 Pro 64-bit v1909 - Build 18363 Custom ISO Install
       #20

    Hello @jsampson45,

    jsampson45 said:
    Thanks for all the time you have spent on this, but it is more than I would spend. Life is short for both myself and my client so I have worked round the problem. I do not need the files now.
    You are very welcome, and I understand what you mean. I am glad that you have found a workaround.

    jsampson45 said:
    Now that I know that files disappear I will need to be alert and not use the temp or tmp folders. Lesson learned.
    That's why whenever I use them in a Script, they are ONLY there momentarily.

    Please mark this Thread as Solved.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:23.
Find Us




Windows 10 Forums