Reg query

Hi all!

Please help me with this query:

View the details of the employees whose salary exceeds the average salary of their own LOCATION

Thank you
Anthony.

If you change your query using deptno instead of loc, the results remain the same:

SQL> select avg(e.sal)
  2       , d.deptno
  3    from emp e
  4       , dept d
  5   where d.deptno = e.deptno
  6   group by d.deptno
  7  /

AVG(E.SAL)     DEPTNO
---------- ----------
1566,66667         30
      2175         20
2916,66667         10

3 rijen zijn geselecteerd.

Note that the join to table dept can be ignored because emp also contains a column deptno.

Now if you want to select the average salary to each employee, you can use the table emp, like this:

SQL> select e.ename
  2       , e.sal
  3       , avg_sal.avg_sal
  4    from ( select avg(e.sal) avg_sal
  5                , d.deptno
  6             from emp e
  7                , dept d
  8            where d.deptno = e.deptno
  9            group by d.deptno
 10         ) avg_sal
 11       , emp e
 12   where e.deptno = avg_sal.deptno
 13  /

ENAME             SAL    AVG_SAL
---------- ---------- ----------
SMITH             800       2175
ALLEN            1600 1566,66667
WARD             1250 1566,66667
JONES            2975       2175
MARTIN           1250 1566,66667
BLAKE            2850 1566,66667
CLARK            2450 2916,66667
SCOTT            3000       2175
KING             5000 2916,66667
TURNER           1500 1566,66667
ADAMS            1100       2175
JAMES             950 1566,66667
FORD             3000       2175
MILLER           1300 2916,66667

14 rijen zijn geselecteerd.

And now, it becomes easy to select employees with an average more wise pay high Department.
Note that, apart from the mentioned optimization earlier, you can also pass the second access of table emp using analytical functions.

And if you don't want to see the average salary, you can use a subquery correlation like this:

SQL> select e.ename
  2       , e.sal
  3    from emp e
  4   where e.sal >
  5         ( select avg(e2.sal)
  6             from emp e2
  7            where e2.deptno = e.deptno
  8         )
  9  /

ENAME             SAL
---------- ----------
ALLEN            1600
JONES            2975
BLAKE            2850
SCOTT            3000
KING             5000
FORD             3000

6 rijen zijn geselecteerd.

I hope this helps.

Kind regards
Rob.

Tags: Database

Similar Questions

  • How can I fix this. REG QUERY "HKLM\SOFTWARE\Microsoft.

    HELP... Can someone please tell me what this means and how can I fix. REG QUERY 'HKLM\SOFTWARE\Microsoft NT\CurrentVersion\AppcompatFlags\UpgrapeExperienceIndicators' / v UpgEx: finderstr UpgEx ERROR: the system was unable to find the specified registry or the value key.

    How does this relate to the features of Windows Update (or recovery)?

    Did you mean "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\ExperienceIndicatorsUpgrade... » ?

    Is this a computer Win7 Pro or Ultimate?

    Is this the same computer (not the same problem) in one or two of these previous discussions of yours?...

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-windows_programs/Windows-feature/3dd93b2b-0500-4173-9e96-10021973d79d

    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-update/install-updates/b1307f0b-cef4-48C6-a9f5-68063c270d0b

  • Reg query using

    Hello

    I'm trying to use Reg Query to review the contents of a registry key. More precisely

    • HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify

    I just want to know what are the subkeys. I expect to be

    • IconStreams and

      PastIconsStream


    Since they are both of type reg_binary, when I do this query I have also all binary data as well, make very large output.

    Is there a way to simply retrieve/request which is in the field/column name and not the data column/field? I tried the /k options and /v who gave me errors, which I interpreted in the sense I was their use either wrong or they are not used in this instance.

    There is not a lot of examples out there and most of repeat them what you find when you use /?.

    Thank you.

    Hello

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums.

    http://social.msdn.Microsoft.com/forums/en-us/windowsgeneraldevelopmentissues

  • using reg query

    Hello

    I'm trying to use Reg Query to review the contents of a registry key.  More precisely

    • HKCU\Software\Classes\Local Settings\Software\Microsoft\Windows\CurrentVersion\TrayNotify

    I just want to know what are the subkeys.  I expect to be

    • IconStreams and
      PastIconsStream

    Since they are both of type reg_binary, when I do this query I have also all binary data as well, make very large output.

    Is there a way to simply retrieve/request which is in the field/column name and not the column/field data ?  I tried the /k options and /v who gave me errors, which I interpreted in the sense I was their use either wrong or they are not used in this instance.

    There is not a lot of examples out there and most of repeat them what you find when you use /?.

    Thank you.

    Hello

    The question you posted would be better suited in the MSDN Forums. I would recommend posting your query in the MSDN Forums.

    http://social.msdn.Microsoft.com/forums/en-us/windowsgeneraldevelopmentissues

  • Reg: query logic.

    Hi Experts,

    I have a requirement of query which am not able to achieve correctly-

    2 tables like this:

    WITH t1 AS)

    SELECT the 1 id, cm_dt of TO_DATE('04.04.2014','dd.mm.yyyy') OF double UNION ALL

    SELECT 2 id, TO_DATE('01.11.2013','dd.mm.yyyy') cm_dt FROM dual UNION ALL

    SELECT 2 id, TO_DATE('29.09.2013','dd.mm.yyyy') cm_dt FROM dual UNION ALL

    Select 3 id, to_date('17.05.2013','dd.mm.yyyy') cm_dt of the double

    )

    t2 AS)

    SELECT the 1 id, TO_DATE('04.05.2014','dd.mm.yyyy') fh_dt, ov 'b', 'a' double UNION ALL nv

    SELECT 1 id, TO_DATE('21.05.2014','dd.mm.yyyy'), 'y', 'x' FROM dual UNION ALL

    SELECT 2 id, TO_DATE('01.10.2013','dd.mm.yyyy'), 'r', 'e' FROM dual UNION ALL

    SELECT the id 2, TO_DATE('15.10.2013','dd.mm.yyyy'), 'x', 'q' FROM dual UNION ALL

    SELECT 2 id, TO_DATE('29.03.2014','dd.mm.yyyy'), 'f', 'b' FROM dual

    )

    My requirement is :


    Check - 1

    For each ID of "t1", need to check in 't2' If a record exists. If the 'id' doesn't exist, you need to select another table called "table_y". Here, T1.ID = 3

    Check the box - 2

    If the ID exists, for each 'id' and T1. CM_DT - is any record in T2 where (T1.id = T2.id and T1. CM_DT < T2. Take FH_DT) then the OV (old value) of the last record.

    Otherwise, if no such folder i.e. all have T1. CM_DT > T2. FH_DT - take NV (new value) of the first record.

    Expected results :

    1 04.04.2014 b

    2 01.11.2013 q

    2 29.09.2013 r

    3 17.05.2013 < some value from another table >

    My try and try again...

    WITH t1 AS)

    SELECT the 1 id, cm_dt of TO_DATE('04.04.2014','dd.mm.yyyy') OF double UNION ALL

    SELECT 2 id, TO_DATE('01.11.2013','dd.mm.yyyy') cm_dt FROM dual UNION ALL

    SELECT 2 id, TO_DATE('29.09.2013','dd.mm.yyyy') cm_dt FROM dual UNION ALL

    Select 3 id, to_date('17.05.2013','dd.mm.yyyy') cm_dt of the double

    )

    t2 AS)

    SELECT the 1 id, TO_DATE('04.05.2014','dd.mm.yyyy') fh_dt, ov 'b', 'a' double UNION ALL nv

    SELECT 1 id, TO_DATE('21.05.2014','dd.mm.yyyy'), 'y', 'x' FROM dual UNION ALL

    SELECT 2 id, TO_DATE('01.10.2013','dd.mm.yyyy'), 'r', 'e' FROM dual UNION ALL

    SELECT the id 2, TO_DATE('15.10.2013','dd.mm.yyyy'), 'x', 'q' FROM dual UNION ALL

    SELECT 2 id, TO_DATE('29.03.2014','dd.mm.yyyy'), 'f', 'b' FROM dual

    )

    ------

    x AS

    (SELECT

    T1.ID, t1.cm_dt, t2.fh_dt, nv, ov,

    ROW_NUMBER() over (PARTITION BY t2.id ORDER BY fh_dt asc) Clotilde,

    MIN (T2.fh_dt) on min_dt (PARTITION BY t2.id),

    Max (T2.fh_dt) on max_dt (PARTITION BY t2.id)

    T1 LEFT JOIN t2 ON (t1.id = t2.id)

    )

    --------

    SELECT distinct

    x.ID, x.cm_dt, x.fh_dt,

    (CASE WHEN cm_dt < = min_dt THEN)

    (SELECT t2.ov FROM t2 WHERE t2.id = AND t2.fh_dt x.id = x.min_dt)

    ON THE OTHER

    (SELECT t2.ov FROM t2 WHERE t2.id = AND t2.fh_dt x.id = x.min_dt)

    Chk1 END)

    X

    ORDER BY id, cm_dt

    Please give some guidance. Help much appreciated.

    -Nordine

    (on Oracle 11.2.0.3.0)

    I think it's something like what you are looking for (if you had provided details of the 'other' table you want to get the values of, then I could have tried integrate this logic in this query, rather than do something using the double table!):

    WITH t1 AS (SELECT 1 id, TO_DATE('04.04.2014','dd.mm.yyyy') cm_dt FROM dual UNION ALL
                SELECT 2 id, TO_DATE('01.11.2013','dd.mm.yyyy') cm_dt FROM dual UNION ALL
                SELECT 2 id, TO_DATE('29.09.2013','dd.mm.yyyy') cm_dt FROM dual UNION ALL
                select 3 id, to_date('17.05.2013','dd.mm.yyyy') cm_dt from dual),
         t2 AS (SELECT 1 id, TO_DATE('04.05.2014','dd.mm.yyyy') fh_dt, 'a' nv,'b' ov FROM dual UNION ALL
                SELECT 1 id, TO_DATE('21.05.2014','dd.mm.yyyy') , 'x','y' FROM dual UNION ALL
                SELECT 2 id, TO_DATE('01.10.2013','dd.mm.yyyy') , 'e','r'  FROM dual UNION ALL
                SELECT 2 id, TO_DATE('15.10.2013','dd.mm.yyyy') , 'q','x' FROM dual UNION ALL
                SELECT 2 id, TO_DATE('29.03.2014','dd.mm.yyyy') , 'b','f' FROM dual),
        res as (select t1.id,
                       t1.cm_dt,
                       t2.fh_dt,
                       t2.nv,
                       t2.ov,
                       min(case when t2.fh_dt > t1.cm_dt then t2.fh_dt end) over (partition by t2.id, t1.cm_dt) min_t2_fh_dt_past_cm_dt,
                       max(case when t2.fh_dt < t1.cm_dt then t2.fh_dt end) over (partition by t2.id, t1.cm_dt) max_t2_fh_dt_pre_cm_dt,
                       coalesce(max(case when t2.fh_dt < t1.cm_dt then t2.fh_dt end) over (partition by t2.id, t1.cm_dt),
                                min(case when t2.fh_dt > t1.cm_dt then t2.fh_dt end) over (partition by t2.id, t1.cm_dt)) comparison_dt
                from   t1,
                       t2
                where  t1.id = t2.id (+))
    select id,
           cm_dt,
           case when comparison_dt is null then (select 'zzz' from dual)
                when comparison_dt > cm_dt then ov
                when comparison_dt < cm_dt then nv
           end replacement_value
    from   res
    where  comparison_dt is null
    or     comparison_dt = fh_dt;
    
            ID CM_DT      REPLACEMENT_VALUE
    ---------- ---------- --------------------------------
             1 04/04/2014 b
             2 29/09/2013 r
             2 01/11/2013 q
             3 17/05/2013 zzz
    
  • Reg: Query with UNION

    Dear all,

    I have two tables

    TABLE A (A_DATE, COLA1, COLA2)

    TABLE B (B_DATE)

    A_DATE = B_DATE

    Examples of tables:

    TABLE A (11 selected lines)

    A_DATE COLA1 COLA2
    03/01/201354VAL76
    04/01/201311VAL78
    04/01/201311VAL22
    04/01/201374VAL22
    04/02/201315VAL45
    04/02/201311VAL22
    04/03/201344VAL22
    04/03/201371VAL73
    04/04/201399VAL13
    04/05/201311VAL22
    04/05/201311VAL23

    TABLE B (01 April-30 April)

    B_DATE
    04/01/2013
    04/02/2013
    04/03/2013
    04/04/2013

    (condition 1: month: April)

    AND

    condition 2: CALA1-> 11

    AND

    condition 3: COLA2-> VAL22)

    I need to display all records for the months April to TABLE A,.

    If the documents are not present in TABLE A for every 30 days, I need to display null, by reading DATE information in TABLE B

    Expected results (sample)

    Date COLA1 COLA2
    04/01/201311VAL22
    04/02/201311VAL22
    04/03/2013
    04/04/2013
    04/05/201311VAL22

    Currently I have the following query

    Select A_DATE, COLA1, COLA2 from TABLEA

    where COLA1 = 11 and COLA2 in ('VAL22') and A_DATE between ' 2013-04-01 00:00:00.0' AND ' 00:00:00.0' 2013-04-30

    Union of all the

    Select B_DATE, null, null from TABLEB if date between ' 2013 - 04 - 01 00:00:00.0' AND ' 00:00:00.0' 2013-04-30

    But I'm the duplicate records for the values in TABLE a.

    Output current (sample)

    Date COLA1 COLA2
    04/01/201311VAL22
    04/01/2013
    04/02/201311VAL22
    04/02/2013
    04/03/2013
    04/04/2013
    04/05/201311VAL22
    04/05/2013

    I tried with UNION and UNION ALL, but getting the same result.

    Hello

    Try this:

    Select b.B_DATE, a, COLA1, one, COLA2

    from TABLEB b

    the left join TABLEA a

    On a.A_DATE = b.B_DATE

    and COLA1 = 11

    and COLA2 in ('VAL22')

    where B_DATE between to_date('2013-04-01','yyyy-mm-dd') AND to_date('2013-04-30','yyyy-mm-dd')

    ----

    Ramin Hashimzade

  • Reg: query sql

    Hi friends.
    Please help on query below.

    I want only the number of the channel, how can I do this example as below.

    Select (upper ('cms0082')) twice;

    of these, I want to single digit numb only 82 nor chanrecter nor the only digits 0 value.

    Aude-

    If you have Oracle 10 g of output (at least), you can use a regular expression:

    select
    to_number(
    regexp_replace((upper('cms0082')),'[^[:digit:]]','') -- removes all non-numeric characters
    )
     from dual;
    
  • Reg: Query Get IP address and host name

    Hi all!!!

    Please help me, I need query for host name and the ip address... Please. its urgent



    Concerning

    Malek

    Hello

    In fact, my need is a record of front end during a deletion of the user. I want delete a record and what record

    Without activated imperatives, it is not possible to track data.

    Note: 60828.1 - Overview of Oracle Applications AuditTrails
    https://MetaLink.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=60828.1

    Note: 105624.1 - Troubleshooting (Audit Trail)
    https://metalink2.Oracle.com/MetaLink/PLSQL/ml2_documents.showDocument?p_database_id=not&P_ID=105624.1

    E Business suit health/Audit?
    E Business suit health/Audit?

    Kind regards
    Hussein

  • Reg: Query writing - please help

    Hello

    can you please help me get the results below?

    select * from emp_time
    
    EMP_ID  SHIFT_START_TIME                      SHIFT_END_TIME                        YARD_DEPARTURE                                                EFFECTIVE_DATE
    220541  03-12-08                              03-12-08                              y                                                              03-12-08
    220541  04-12-08                              04-12-08                              y                                                              04-12-08
    220541  18-02-09                              18-02-09                              y                                                              18-02-09
    220541  20-02-09                              20-02-09                              y                                                              20-02-09
    220541  24-02-09                              24-02-09                              y                                                              24-02-09
    220541  25-02-09                              25-02-09                              y                                                              25-02-09
    220541  26-02-09                              26-02-09                              y                                                              26-02-09
    220541  27-02-09                              27-02-09                              y                                                              27-02-09
    220541  28-02-09                              28-02-09                              y                                                              28-02-09
    220541  28-03-09                              28-03-09                              y                                                              28-03-09
    
    select * from emp_time
    where effective_date between to_date('02-20-09','mm-dd-yy') and to_date('02-24-09','mm-dd-yy');
    
    EMP_ID  SHIFT_START_TIME                      SHIFT_END_TIME                        YARD_DEPARTURE                                                EFFECTIVE_DATE
    220541  20-02-09                              20-02-09                              y                                                              20-02-09
    220541  24-02-09                              24-02-09                              y                                                              24-02-09
    
    Expected output:
    
    EMP_ID  SHIFT_START_TIME                      SHIFT_END_TIME                        YARD_DEPARTURE                                                EFFECTIVE_DATE
    220541  20-02-09                              20-02-09                              y                                                              20-02-09
    220541  20-02-09                              20-02-09                              y                                                              21-02-09
    220541  20-02-09                              20-02-09                              y                                                              22-02-09
    220541  20-02-09                              20-02-09                              y                                                              23-02-09
    220541  24-02-09                              24-02-09                              y                                                              24-02-09
    
    
    

    Oracle Version: 11.2.0

    Kind regards

    Jame

    Let me make a try also, because your statement only a min and max on XX, efective_date whatever the emp_id ;-)

    I pretend not, this one is better (too many results that must be filtered with a separate), but it should be emp id independent

    with emp_exist as (select emp_id

    shift_start_time

    shift_end_time

    yard_departure

    effective_date

    of emp_time)

    emp_fake as (select emp_id separate

    to_date('02-20-09','mm-dd-yy') shift_start_time

    to_date('02-20-09','mm-dd-yy') shift_end_time

    , 'y' yard_departure

    , to_date (20 February 09 ',' dd-mm-aa "") + effective_date level 1

    of emp_exist

    connect by level<=>

    Select emp_id nvl (t1.emp_id, t2.emp_id)

    nvl (t1.shift_start_time, t2.shift_start_time) shift_start_time

    nvl (t1.shift_end_time, t2.shift_end_time) shift_end_time

    nvl (t1.yard_departure, t2.yard_departure) yard_departure

    nvl (t1.effective_date, t2.effective_date) effective_date

    of emp_exist t1

    join right emp_fake t2

    on (t1.emp_id = t2.emp_id

    and t1.effective_date = t2.effective_date)

    order effective_date;

  • AS REG Query EX Question OR

    on 10G

    I have a question... I'm helping someone, there is a problem for the records in the database for some clients and HE knows and are working on a fix, which will not come next week, but that is the problem, I hope for some SQL using AS (if possible) or REGEX.

    Basically this is the problem...

    A normal address should look like this:
    ADDRESS_FIELD     CITY         STATE     ZIP
    123 Elm Street       SomeCity      WA      12345
    but some IT tweak created a problem in the database, where some customer address themselves like this:
    ADDRESS_FIELD                 CITY         STATE     ZIP
    12345123SomeCity WA       SomeCity      WA      12345
    as you can see, the POSTAL code, (in the name of w/street address lack, city and State) find themselves in the ADDRESS field, where only a street address should be.

    I'm trying to help my friend to identify these records.

    Is it possible to scan the ADDRESS_FIELD and see if the fields / the CITY STATE or ZIP are residing within the ADDRESS_FIELD?

    WHERE ADDRESS_FIELD LIKE CITY? without having to type the actual address, because I need a way to digitize millions of addresses and not one stop?

    I know it's crazy, but in reality this site right now.

    How about this?

    SELECT * FROM TBL
    WHERE ADDRESS_FIELD LIKE '%'||ZIP||'%'
    
  • help reg query

    Hello

    I have a table with the following structure

    col1 col2 col3 col4
    A value of Null Null X
    Null Null X
    A Y Null Null

    I need the output below
    A X X Y

    Could you please help a write request example

    Best regards
    SRID

    Select col1, sum (col2), sum (col2), sum (col3) from table_name group by col1;

  • Reg.exe stopped working on windows 7 64 bit when I want to play an old game.

    Hello guys. I am using windows 7 Home premium 64-bit in my laptop. I just downloaded an old game (2005-2006 perhaps) so I wanted to play. After finishing download (no virus, I checked), and I run the executable files, the message occurred: Reg.exe has stopped working. and the game does not start.

    The game has an application inside reg.exe file, and I think I have to run it manually. but when I tried to run it, the same message is produced.

    This is the error log:

    Signature of the problem:
    Problem event name: BEX

    Application name: reg.exe
    Application version: 0.0.0.0
    Application timestamp: 44eeabe9
    Fault Module name: StackHash_0a9e
    Fault Module Version: 0.0.0.0
    Fault Module Timestamp: 00000000
    Exception offset: 0018fedb
    Exception code: c0000005
    The exception data: badc0de1
    OS version: 6.1.7600.2.0.0.768.3
    Locale ID: 1033
    Additional information 1: 0a9e
    More information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional information 3: 0a9e
    Additional information 4: 0a9e372d3b4ad19135b953a78882e789

    I already asked in a computer forum, but they said that it is the problem of the ILO. and I read in microsoft help, the reg.exe will not run under 64-bit windows. I read the conclusion, but this isn't for windows server 2003, Windows 7. It says that I have to type reg query \\64server\HKLM\software/reg: 64 or if I want to change it to 32 bits reg.exe, I need to replace the reg: 64 by reg: 32.

    Will there be another conclusion of this problem instead to install the 32-bit operating system?

    What about XP mode for windows 7, it'll work?

    Help me please... Thank you very much.

    Best regards

    Hi Liclac,

    ·        What is the name of the game?

    Check if the game is compatible with windows 7, you can see the ink below:http://www.microsoft.com/windows/compatibility/windows-7/en-us/default.aspx

    If the game is not compatible then you can try to run the game in compatibility mode or in windows XP mode.

    Try to run the game in compatibility mod and check if the error occurs again: make sure to run older programs in this version of Windows:http://windows.microsoft.com/en-US/windows7/Make-older-programs-run-in-this-version-of-Windows

    With regard to:

    Samhrutha G S - Microsoft technical support.

    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Pavilion 15 ab035TX: get Windows 10 App (upgrade to Windows 10)

    I just bought a HP Pavilion 15-ab035TX.

    I'm unable to register for free upgrade. There's apparantely no 'Get app Windows 10' on the taskbar.

    Features of the laptop:

    Processor: Intel Core i7 (5th Gen 5520U)

    RAM: 8 GB

    Storage: 1 TB

    Current OS: Windows 8.1 Pro

    KB 3035583 and KB 2976978 are already installed.

    I've tried these:

    1. uninstalled and instaled again updates following: KB 3035583 and KB 2976978

    2. I also tried this method:

    Followed these instructions and restarted.

    1. Open Notepad
    2. Copy the following text and paste it into Notepad:

    REG QUERY "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\UpgradeExperienceIndicators" /v UpgEx | Findstr UpgEx

    If '%ERRORLEVEL%' is '0' GOTO RunGWX

    Tracking Add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Appraiser" /v UtcOnetimeSend /t REG_DWORD /d 1/f

    SCHTASKS/Run /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Evaluator.

    : CompatCheckRunning

    schtasks/query /TN "\Microsoft\Windows\Application Experience\Microsoft evaluator of compatibility.

    schtasks/query /TN "\Microsoft\Windows\Application Experience\Microsoft Compatibility Evaluator. Findstr Ready

    If NOT '%errorlevel%' == '1' ping localhost > null & goto: CompatCheckRunning

    : RunGWX

    SCHTASKS/Run /TN "\Microsoft\Windows\Setup\gwx\refreshgwxconfig."

    1. Click on file, then record under
    2. In the file name box, replace the file name ReserveWin10.cmd

    3. Then click on the drop-down list next to record under, and select all files (*. *)

    4. Select the folder you want to save the file.  For this example, we will choose to save the file in the C:/Temp folder.  And then click Save.

    5. Open an elevated command prompt.  (Since the splash screen or the start menu, type command prompt in the search box, and then in the list of results, right-click command promptand selectrun as administrator.)

    6. Finally, run the file in the location that you saved in step 6.  In this example, you type the following in the command prompt window and press ENTER:

      C:/temp/ReserveWin10.cmd

    However, I am not able to get any Windows 10 application on the toolbar Widnows 10 reserve.

    Just solved!
    Used the 3rd option in this tool: https://goo.gl/G5DgeG

  • Free disk space on the C partition

    Separated from this thread.

    I am also having the same problem.  I am running Vista Home Premium SP2.  I was getting close to complete on my drive C (13% free space). I was shocked to see how quickly it filled up, almost as if he did it by himself.  I was downloading a lot so I had no idea how it happened.  I ran each program cleaning and each antivirus that I had to try to make room.  I cleaned up program files deleted a bunch of audio and video files, and it does not seem to do much more of a difference.  I shut down the computer for the night and is returned to him the next morning.  I ran and bought a few flash drives to transfer files more and when I booted up I checked the hard drive and it was back to 48% free space (as it was before).  I have no idea what happened, but so far, it seems to be fixed...?   one of the cleansers I ran also ccleaner.

    Free disk space
    Last updated 18/01/2014
     

    Content

    • To see how much space you have used and free
    • To see where the files are too much space
    • Disk Cleanup
    • System restore
    • Fix the basket
    • Fix temporary Internet files
    • Delete files in the system and the folder Temp of Service Profiles
    • Check the size of the swap file
    • Disable the hibernation
    • Compact the Windows databases use various
    • Delete the files updated by the Service Pack
    • Move your Documents
    • Remove saved files created by Photo Gallery
    • Which extends the size of the disk
    • Compress files
    • Turn off the low disk space warnings
    • Boost disk cleanup
     

    To see how much space you have used and free

    Start - All Programs - Accessories- Click with the right button on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    For the system drive

    WMIC volume where (DriveLetter = '% lecteur_systeme %') are legend, capacity, freespace List

    For all readers

    WMIC volume get/all, freespace, the ability, the legend

    If you want to store this info on your desktop

    WMIC /append:"%userprofile%\desktop\Free on disk space" volume get Caption, freespace format:htable

    To open double click on Free Disk Space on your desk or type

    Start "" "%userprofile%\desktop\Free report.HTML of disk space.

    Then come back here after cleaning and repeat these commands to see the difference.

    If for any reason, the wmic command does not work, use these two commands. Both take a lot of time.

    % Lecteur_systeme % - one defrag

    or

    dir %systemdrive%\*.*/a/s

     
    To see where the files are too much space
     
    It lists the number of files and the size of the folders on your drive. Each command is a subset, so you can run it better.
     

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).
     
     
    Then configure the command prompt. Right-click on the tab of the titlebar - Properties - Layout command prompt - and enter 1000 screen buffer size height and 43 (or 50) to Window Dimensions height. Change the color (color tab) and the police (police tab), if you want.
     
    To see the size of the folders in Documents, excluding images, video, or music files.
     
    for /f "Skip = 2 tokens = 3 ' set doc = A %%A in ('Reg query"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"/v"Personal"")
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "\/"^|findstr/l/v "photos video" ') @echo %j & echo. "
     
    To see the size of the folders in the music.
     
    for /f "Skip = 2 tokens = 4" %A in ('Reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v 'My music' ") set Doc = A %
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."

     
    To see the size of the image files.
     
    for /f "Skip = 2 tokens = 4" %A in (' Reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My pictures" /v ") set Doc = A %
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."
     
    To see the size of the files in the video.
     
    for /f "Skip = 2 tokens = 4" %A in ('Reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v 'My videos' ") set Doc = A %
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."
     
    To see the size of the files on the desktop.
     
    for /f "Skip = 2 tokens = 3 ' set doc = A %%A in ('Reg query"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"/v"Desktop"")
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."

    To see the size of the files in the Windows folder.
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("'%windir%' dir /a /s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."
     

    To see the size of the files in the Program Files folder.
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("'%ProgramFiles%' dir /a /s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."
     
     

    Disk Cleanup
    To run Disk Cleanup, normal is to click with the right button on the drive in my computer (Start menu - computer), then Properties - general tab - Disk Cleanup button.
     
     
    Another way is menu Start - All Programs - Accessories - System - Disk Cleanup tools.
     
    Disk Cleanup can be started from the command line.
     

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

     
    To make your primary drive.
     
    cleanmgr letter
     
    Choose which lead to do.
     
    Cleanmgr
     
    See the last section of this post to see how to performance of disk cleanup.

     System restore

    With disk cleanup displays above the Other Options tab. You can delete all but the last System Restore point and see if that is too much space.

    System Restore uses 15% of the space normally. Change click Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type Regedit and navigate to

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg

    Double click on DiskPercent and click on decimal and change the value to the desired percentage,

    You can change the command prompt.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see the size of the system restore folder.

    You don't normally have access to this folder. You will need to take possession, allow administrators to permission, then the size of the query.

    takeown /f "%systemdrive%\System Volume Information" / a r d y
    ICACLS "%systemdrive%\System Volume Information" / grant administrators: f, t, c, q
    dir "%systemdrive%\System Volume Information" / a/s

    To see the current percentage

    Reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg" /v DiskPercent

    It is in hexadecimal. The numbers are 0-9 and a-f. So 0xf is 15. 0x5 is 5, 0 x 9 is 9, 0xa is 10, 0 x 14 is 20.

    To set a different value.

    You can use decimal values to set. This affects 10% (in bold in the example and the last item in the line).

    Tracking Add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg" /v DiskPercent /t REG_DWORD /f /d 10
     
    To repair the system restore, file delete and restart the system restore.
      
    SC stop vss
    takeown /f "%systemdrive%\System Volume Information" / a r d y
    ICACLS "%systemdrive%\System Volume Information" / grant administrators: f, t, c, q
    e "%systemdrive%\System Volume Information" / q/s
    SC start vss

    Fix the basket

    Sometimes, files get lost in the trash. Remove the storage folders. It will be automatically re-created next time you delete a file or open the Recycle Bin. It will remove the trash and the files it contains for all users.

    Empty the trash.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see the size of the files in the Recycle Bin

    It must have one or no files inside if you work. There should be a directory (folder) by user.

    dir % systemdrive%\$RECYCLE. BIN\ *. * /a /s

    To reset the trash

    e % systemdrive%\$RECYCLE. BIN/s/q

    Fix temporary Internet files

    Sometimes, files get lost in the temporary internet files folder. Delete the files. It will be automatically recreated the next time download you. It will remove the current user only.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see the temporary internet files size empty files folder

    RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 8

    dir ' %userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\ *.» "*" '%userprofile%\AppData\Local\Microsoft\Internet Explorer\DOMStore\*.*' / a/s

    Then delete.

    Close Internet Explorer and the Explorer first. Some files may not remove at the moment, they can be deleted later.

    "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files" del /s /q

    also the DOM store, similar to TIF.

    "%userprofile%\AppData\Local\Microsoft\Internet Explorer\DOMStore" del /s /q

    So to see the new size.

    dir ' %userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\ *.» "*" '%userprofile%\AppData\Local\Microsoft\Internet Explorer\DOMStore\*.*' / a/s

     
    To see the size of the cache, type the following
     

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

     
    Reg query /v "Settings\5.0\Cache\Content Software" CacheLimit valid
    Use the calculator to convert hexadecimal into decimal. Start the Calculator (Start - All Programs - Accessories - calculator) and choose the menu display - scientific, then the menu display - Hex. Enter the value returned above. Menu display - decimal. To convert windows units divide by 1024 for kilobytes, divide by 1024 megabytes.
     
    Located between 50 MB and 250 MB. You can use decimal here. The unit is expressed in kilobytes. Here it is 250 megabytes (250 000 x 1024 bytes)
     
    Add tracking 'Software Settings\5.0\Cache\Content' v CacheLimit valid /t Reg_DWord /d 250000 f
      

    Delete files in the system and the folder Temp of Service Profiles

    The system temp folder is only used when no one connects. It is rarely used but never cleaned. Some services have their own temporary folder which is also cleaned.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To the list

    dir c:\windows\temp C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp/a/s

    To remove

    del C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\*.* C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\*.* c:\windows\temp\*.*/s/f/q

    Check the size of the swap file

    As a rule generally you want to your swap file slightly larger than the amount of memory that you have. It develops automatically but spread automatically. If you use hungery memory programs as this video editing should be bigger. If too big you can reduce and rush of space can be moved to another drive.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see what was your use

    WMIC pagefile get List

    To see the size of the file on disk

    dir /a c:\pagefile.sys

    To change the size or change the road see change the size of virtual memory in Start - Help and Support.

     

    Disable the hibernation

    The file shows up is the same size of installed memory. If this is not the case, turn off the computer in hibernation and save a lot of disk space.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see if it is on

    If the file will be found. If off the file won't be there.

    dir %systemdrive%\hiberfil.sys /a

    To turn off

    powercfg-h off

    Make a u-turn

    powercfg-h on

    Compact the Windows databases use various

    You can compact the various databases that Windows uses. This is the Windows Update, Windows Search, and certificates of security, Windows Mail, Windows Contacts, Windows, Windows Live and Internet Explorer ver 10 applications calendar.

    Close Windows Mail and Internet Explorer. Wait a minute for Internet Explorer release locks of sound files.

    See how much space taking up type which is below and note the total size (because it scrolls away).

    Start - All Programs - Accessories- Click with the right button on command prompt and choose Run As Administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    dir c:\*.edb c:\*.msmessagestore c:\WebCacheV*.dat c:\catdb/a/s

    Then at compact

    SC stop wuauserv
    stop bits SC
    SC stop wsearch
    SC stop cryptsvc
    for c:\ /r %A in (*.edb *.msmessagestore WebCacheV*.dat catdb *.) do esentutl.exe /p "%A" / o
    for c:\ /r %A in (*.edb *.msmessagestore WebCacheV*.dat catdb *.) do esentutl.exe /d "%A".
    SC start cryptsvc

    SC start wsearch

    SC start bits
    SC start wuauserv

    Then to delete some temporary files.

    del c:\*.integ.raw c:\TEMPDFRG*.edb/s

    To see the new size and compare it to the old size

    dir c:\*.edb c:\*.msmessagestore c:\WebCacheV*.dat c:\catdb/a/s

    If a program has a file open, you can use this procedure to find out which program.

    openfiles/local on

    Reset

    openfiles/query /v | findstr /i "WebCacheV [0-9] *------catdb \.edb \.msmessagestore .dat".

    Delete the files updated by the Service Pack

    See how much space taking up type which is below and note the total size (because it scrolls away). Also, note that the total is higher than it actually is.

    This will remove the ability to uninstall service packs.

    According to the service pack that Windows was provided with you can have both, one or none of these two files.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    dir /a /s c:\Windows\WinSxS

    Then type

    Vsp1cln.exe
    COMPCLN.exe

    To see the new size and compare it to the old size

     
    c:\windows\WinSxS dir /a /s

    Move your Documents

    If you have another disk, you can move the documents folder to it.

    Click with the right button on your Documents (or pictures, etc.) Office, videos, Contacts,) the tab file - Properties - location - move.

     

    Delete the thumbnail and icon Caches

    These files can contain thumbnails or icons of files deleted a long time ago. The files will be recreated if necessary.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste). The desktop and the start menu will disappear briefly.

    To see the size

    dir "% userprofile%\AppData\Local\*.db" "% userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db" /a

    then remove

    Taskkill /im explorer.exe/f
    attrib - r s h '% userprofile%\AppData\Local\*.db '.
    attrib - r s h '% userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db '.
    del "% userprofile%\AppData\Local\*.db".
    del "% userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db".
    Explorer

    to check the new size

    dir "% userprofile%\AppData\Local\*.db" "% userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db" /a

     

    Remove saved files created by Photo Gallery

     

    Photo Gallery Windows makes a copy of any file that you are editing. Click Start - All Programs - Accessories - (or press the Windows key + R). Type

    Images of the hull: original

    Delete the ones you don't want.

    Which extends the size of the disk

    If all the space on the disk has not all been used it is possible to extend your drive.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    DiskPart

    then type

    Select the c volume:

    Then type to see in size

    the list volume

    then (it will work if possible or not as appropriate)

    extend

    type to display the new size

    the list volume

    then type exit

    output

    If you want advice on the extension of the partition type the following and paste the result back

    DiskPart

    list disk

    the list volume

    Select disk 0

    partition from the list

    Select disk 1

    partition from the list

    output

    To copy the final text right click in the window - Mark , then select the text and press enter.
     

    Compress files

    There are two ways to compress files in windows. Zip files and built-in file compression. It's built-in file compression. For more information on compression type zip in Start - Help and Support .

    Photos, music and video are already compressed. They can get larger if Windows tries to compress it any further. Also usually a bad idea to compress system files.

    If you have files of worksheet they can very well be compressed. If you have files, installation files, they can also be good candidates. Web pages are also good candidates.

    In Windows Explorer, blue file names means Tablet (it is the file system compression not aka zip files compressed files). Green filename means Encrypted.

    To disable file names colored, in Explorer - Tools menu (Alt + T)- display tab and then clear the check box for Show encrypted or compressed NTFS in color .

    Windows compression, encryption and security to work for the most part by applying attributes to a folder and the files in the folder inherit the folder.

    If you have all the files appropriate for compression, find them in solution, made Explorer right click - Properties - general -Advanced button tab - Compress contents to save disk space. Choose to apply to all files and folders when asked.

    To use a command line to compress the files in the Favorites folder.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    compact/c /s:"%userprofile%\Favorites." *

    Put in Favorites to compress files added

    compact/c /s:"%userprofile%\Favorites.

    To view the details of the compression of the Favorites folder

    Compact '% userprofile%\Favorites\*.* '.

     

     

    Turn off the low disk space warnings

    To disable the function to display the disk low space warnings.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    Tracking Add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" v "NoLowDiskSpaceChecks" /t REG_DWORD /d 1 f

    gpupdate/force

     

    Boost disk cleanup

    • Operation of disk cleanup
    • Schedule disk cleanup
    • Creating custom cleaners

    To see a list of products of cleaning disk cleanup.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    @echo. & @echo list of cleaners&@echo = & FOR /F "usebackq tokens = 8 delims =-' %i IN ('reg query 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches'") @echo %i

    
     List of cleaners
     ================
     Active Setup Temp Folders
     Content Indexer Cleaner
     Downloaded Program Files
     Hibernation File
     Internet Cache Files
     Memory Dump Files
     Microsoft_Event_Reporting_2.0_Temp_Files
     Offline Pages Files
     Old ChkDsk Files
     Previous Installations
     Recycle Bin
     Setup Log Files
     System error memory dump files
     System error minidump files
     Temporary Files
     Temporary Setup Files
     Temporary Sync Files
     Thumbnail Cache
     Upgrade Discarded Files
     Windows Error Reporting Archive Files
     Windows Error Reporting Queue Files
     Windows Error Reporting System Archive Files
     Windows Error Reporting System Queue Files
     WLX Thumbnail Cache
    
     

  • Urgent please help: How can I find on what fills my hard drive?

    My drive C guard fills, and I don't know why.  Yesterday, I removed more than 40 GB of files and delete a lot more (I emptied the Recycle Bin).  In the last 4 hours, filled an another 30 GB and I'm now in the red zone (5 GB in the last twenty minutes!).  I only kept a very small Word document on the hard drive.

    It only started past recently, in the last two weeks or more.  I am on Windows Vista and I have McAfee.  I recently completed a full scan and nothing significant has come.

    I have only 5 GB on my C drive on the left, and there is nothing more that I can remove it.  How can I find out what does this and how do I that to solve this problem?

    Any emergency assistance will be greatly appreciated!

    Thank you.

    Free disk space
    Last updated 18/01/2014
     

    Content

    • To see how much space you have used and free
    • To see where the files are too much space
    • Disk Cleanup
    • System restore
    • Fix the basket
    • Fix temporary Internet files
    • Delete files in the system and the folder Temp of Service Profiles
    • Check the size of the swap file
    • Disable the hibernation
    • Compact the Windows databases use various
    • Delete the files updated by the Service Pack
    • Move your Documents
    • Remove saved files created by Photo Gallery
    • Which extends the size of the disk
    • Compress files
    • Turn off the low disk space warnings
    • Boost disk cleanup
     

    To see how much space you have used and free

    Start - All Programs - Accessories- Click with the right button on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    For the system drive

    WMIC volume where (DriveLetter = '% lecteur_systeme %') are legend, capacity, freespace List

    For all readers

    WMIC volume get/all, freespace, the ability, the legend

    If you want to store this info on your desktop

    WMIC /append:"%userprofile%\desktop\Free on disk space" volume get Caption, freespace format:htable

    To open double click on Free Disk Space on your desk or type

    Start "" "%userprofile%\desktop\Free report.HTML of disk space.

    Then come back here after cleaning and repeat these commands to see the difference.

    If for any reason, the wmic command does not work, use these two commands. Both take a lot of time.

    % Lecteur_systeme % - one defrag

    or

    dir %systemdrive%\*.*/a/s

     
    To see where the files are too much space
     
    It lists the number of files and the size of the folders on your drive. Each command is a subset, so you can run it better.
     

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).
     
     
    Then configure the command prompt. Right-click on the tab of the titlebar - Properties - Layout command prompt - and enter 1000 screen buffer size height and 43 (or 50) to Window Dimensions height. Change the color (color tab) and the police (police tab), if you want.
     
    To see the size of the folders in Documents, excluding images, video, or music files.
     
    for /f "Skip = 2 tokens = 3 ' set doc = A %%A in ('Reg query"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"/v"Personal"")
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "\/"^|findstr/l/v "photos video" ') @echo %j & echo. "
     
    To see the size of the folders in the music.
     
    for /f "Skip = 2 tokens = 4" %A in ('Reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v 'My music' ") set Doc = A %
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."

     
    To see the size of the image files.
     
    for /f "Skip = 2 tokens = 4" %A in (' Reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" "My pictures" /v ") set Doc = A %
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."
     
    To see the size of the files in the video.
     
    for /f "Skip = 2 tokens = 4" %A in ('Reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders" /v 'My videos' ") set Doc = A %
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."
     
    To see the size of the files on the desktop.
     
    for /f "Skip = 2 tokens = 3 ' set doc = A %%A in ('Reg query"HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"/v"Desktop"")
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("dir"% doc"/ a/s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."

    To see the size of the files in the Windows folder.
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("'%windir%' dir /a /s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."
     

    To see the size of the files in the Program Files folder.
     
    for /f "usebackq tokens = 2 * delims =" %i IN ("'%ProgramFiles%' dir /a /s ^ |") "." findstr/i/v "-/"') @echo %j & echo. "."
     
     

    Disk Cleanup
    To run Disk Cleanup, normal is to click with the right button on the drive in my computer (Start menu - computer), then Properties - general tab - Disk Cleanup button.
     
     
    Another way is menu Start - All Programs - Accessories - System - Disk Cleanup tools.
     
    Disk Cleanup can be started from the command line.
     

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

     
    To make your primary drive.
     
    cleanmgr letter
     
    Choose which lead to do.
     
    Cleanmgr
     
    See the last section of this post to see how to performance of disk cleanup.

     System restore

    With disk cleanup displays above the Other Options tab. You can delete all but the last System Restore point and see if that is too much space.

    System Restore uses 15% of the space normally. Change click Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type Regedit and navigate to

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg

    Double click on DiskPercent and click on decimal and change the value to the desired percentage,

    You can change the command prompt.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see the size of the system restore folder.

    You don't normally have access to this folder. You will need to take possession, allow administrators to permission, then the size of the query.

    takeown /f "%systemdrive%\System Volume Information" / a r d y
    ICACLS "%systemdrive%\System Volume Information" / grant administrators: f, t, c, q
    dir "%systemdrive%\System Volume Information" / a/s

    To see the current percentage

    Reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg" /v DiskPercent

    It is in hexadecimal. The numbers are 0-9 and a-f. So 0xf is 15. 0x5 is 5, 0 x 9 is 9, 0xa is 10, 0 x 14 is 20.

    To set a different value.

    You can use decimal values to set. This affects 10% (in bold in the example and the last item in the line).

    Tracking Add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SystemRestore\cfg" /v DiskPercent /t REG_DWORD /f /d 10
     
    To repair the system restore, file delete and restart the system restore.
      
    SC stop vss
    takeown /f "%systemdrive%\System Volume Information" / a r d y
    ICACLS "%systemdrive%\System Volume Information" / grant administrators: f, t, c, q
    e "%systemdrive%\System Volume Information" / q/s
    SC start vss

    Fix the basket

    Sometimes, files get lost in the trash. Remove the storage folders. It will be automatically re-created next time you delete a file or open the Recycle Bin. It will remove the trash and the files it contains for all users.

    Empty the trash.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see the size of the files in the Recycle Bin

    It must have one or no files inside if you work. There should be a directory (folder) by user.

    dir % systemdrive%\$RECYCLE. BIN\ *. * /a /s

    To reset the trash

    e % systemdrive%\$RECYCLE. BIN/s/q

    Fix temporary Internet files

    Sometimes, files get lost in the temporary internet files folder. Delete the files. It will be automatically recreated the next time download you. It will remove the current user only.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see the temporary internet files size empty files folder

    RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 8

    dir ' %userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\ *.» "*" '%userprofile%\AppData\Local\Microsoft\Internet Explorer\DOMStore\*.*' / a/s

    Then delete.

    Close Internet Explorer and the Explorer first. Some files may not remove at the moment, they can be deleted later.

    "%userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files" del /s /q

    also the DOM store, similar to TIF.

    "%userprofile%\AppData\Local\Microsoft\Internet Explorer\DOMStore" del /s /q

    So to see the new size.

    dir ' %userprofile%\AppData\Local\Microsoft\Windows\Temporary Internet Files\ *.» "*" '%userprofile%\AppData\Local\Microsoft\Internet Explorer\DOMStore\*.*' / a/s

     
    To see the size of the cache, type the following
     

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

     
    Reg query /v "Settings\5.0\Cache\Content Software" CacheLimit valid
    Use the calculator to convert hexadecimal into decimal. Start the Calculator (Start - All Programs - Accessories - calculator) and choose the menu display - scientific, then the menu display - Hex. Enter the value returned above. Menu display - decimal. To convert windows units divide by 1024 for kilobytes, divide by 1024 megabytes.
     
    Located between 50 MB and 250 MB. You can use decimal here. The unit is expressed in kilobytes. Here it is 250 megabytes (250 000 x 1024 bytes)
     
    Add tracking 'Software Settings\5.0\Cache\Content' v CacheLimit valid /t Reg_DWord /d 250000 f
      

    Delete files in the system and the folder Temp of Service Profiles

    The system temp folder is only used when no one connects. It is rarely used but never cleaned. Some services have their own temporary folder which is also cleaned.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To the list

    dir c:\windows\temp C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp/a/s

    To remove

    del C:\Windows\ServiceProfiles\NetworkService\AppData\Local\Temp\*.* C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp\*.* c:\windows\temp\*.*/s/f/q

    Check the size of the swap file

    As a rule generally you want to your swap file slightly larger than the amount of memory that you have. It develops automatically but spread automatically. If you use hungery memory programs as this video editing should be bigger. If too big you can reduce and rush of space can be moved to another drive.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see what was your use

    WMIC pagefile get List

    To see the size of the file on disk

    dir /a c:\pagefile.sys

    To change the size or change the road see change the size of virtual memory in Start - Help and Support.

     

    Disable the hibernation

    The file shows up is the same size of installed memory. If this is not the case, turn off the computer in hibernation and save a lot of disk space.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    To see if it is on

    If the file will be found. If off the file won't be there.

    dir %systemdrive%\hiberfil.sys /a

    To turn off

    powercfg-h off

    Make a u-turn

    powercfg-h on

    Compact the Windows databases use various

    You can compact the various databases that Windows uses. This is the Windows Update, Windows Search, and certificates of security, Windows Mail, Windows Contacts, Windows, Windows Live and Internet Explorer ver 10 applications calendar.

    Close Windows Mail and Internet Explorer. Wait a minute for Internet Explorer release locks of sound files.

    See how much space taking up type which is below and note the total size (because it scrolls away).

    Start - All Programs - Accessories- Click with the right button on command prompt and choose Run As Administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    dir c:\*.edb c:\*.msmessagestore c:\WebCacheV*.dat c:\catdb/a/s

    Then at compact

    SC stop wuauserv
    stop bits SC
    SC stop wsearch
    SC stop cryptsvc
    for c:\ /r %A in (*.edb *.msmessagestore WebCacheV*.dat catdb *.) do esentutl.exe /p "%A" / o
    for c:\ /r %A in (*.edb *.msmessagestore WebCacheV*.dat catdb *.) do esentutl.exe /d "%A".
    SC start cryptsvc

    SC start wsearch

    SC start bits
    SC start wuauserv

    Then to delete some temporary files.

    del c:\*.integ.raw c:\TEMPDFRG*.edb/s

    To see the new size and compare it to the old size

    dir c:\*.edb c:\*.msmessagestore c:\WebCacheV*.dat c:\catdb/a/s

    If a program has a file open, you can use this procedure to find out which program.

    openfiles/local on

    Reset

    openfiles/query /v | findstr /i "WebCacheV [0-9] *------catdb \.edb \.msmessagestore .dat".

    Delete the files updated by the Service Pack

    See how much space taking up type which is below and note the total size (because it scrolls away). Also, note that the total is higher than it actually is.

    This will remove the ability to uninstall service packs.

    According to the service pack that Windows was provided with you can have both, one or none of these two files.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    dir /a /s c:\Windows\WinSxS

    Then type

    Vsp1cln.exe
    COMPCLN.exe

    To see the new size and compare it to the old size

     
    c:\windows\WinSxS dir /a /s

    Move your Documents

    If you have another disk, you can move the documents folder to it.

    Click with the right button on your Documents (or pictures, etc.) Office, videos, Contacts,) the tab file - Properties - location - move.

     

    Delete the thumbnail and icon Caches

    These files can contain thumbnails or icons of files deleted a long time ago. The files will be recreated if necessary.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste). The desktop and the start menu will disappear briefly.

    To see the size

    dir "% userprofile%\AppData\Local\*.db" "% userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db" /a

    then remove

    Taskkill /im explorer.exe/f
    attrib - r s h '% userprofile%\AppData\Local\*.db '.
    attrib - r s h '% userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db '.
    del "% userprofile%\AppData\Local\*.db".
    del "% userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db".
    Explorer

    to check the new size

    dir "% userprofile%\AppData\Local\*.db" "% userprofile%\AppData\Local\Microsoft\Windows\Explorer\*.db" /a

     

    Remove saved files created by Photo Gallery

     

    Photo Gallery Windows makes a copy of any file that you are editing. Click Start - All Programs - Accessories - (or press the Windows key + R). Type

    Images of the hull: original

    Delete the ones you don't want.

    Which extends the size of the disk

    If all the space on the disk has not all been used it is possible to extend your drive.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    DiskPart

    then type

    Select the c volume:

    Then type to see in size

    the list volume

    then (it will work if possible or not as appropriate)

    extend

    type to display the new size

    the list volume

    then type exit

    output

    If you want advice on the extension of the partition type the following and paste the result back

    DiskPart

    list disk

    the list volume

    Select disk 0

    partition from the list

    Select disk 1

    partition from the list

    output

    To copy the final text right click in the window - Mark , then select the text and press enter.
     

    Compress files

    There are two ways to compress files in windows. Zip files and built-in file compression. It's built-in file compression. For more information on compression type zip in Start - Help and Support .

    Photos, music and video are already compressed. They can get larger if Windows tries to compress it any further. Also usually a bad idea to compress system files.

    If you have files of worksheet they can very well be compressed. If you have files, installation files, they can also be good candidates. Web pages are also good candidates.

    In Windows Explorer, blue file names means Tablet (it is the file system compression not aka zip files compressed files). Green filename means Encrypted.

    To disable file names colored, in Explorer - Tools menu (Alt + T)- display tab and then clear the check box for Show encrypted or compressed NTFS in color .

    Windows compression, encryption and security to work for the most part by applying attributes to a folder and the files in the folder inherit the folder.

    If you have all the files appropriate for compression, find them in solution, made Explorer right click - Properties - general -Advanced button tab - Compress contents to save disk space. Choose to apply to all files and folders when asked.

    To use a command line to compress the files in the Favorites folder.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    compact/c /s:"%userprofile%\Favorites." *

    Put in Favorites to compress files added

    compact/c /s:"%userprofile%\Favorites.

    To view the details of the compression of the Favorites folder

    Compact '% userprofile%\Favorites\*.* '.

     

     

    Turn off the low disk space warnings

    To disable the function to display the disk low space warnings.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    Tracking Add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" v "NoLowDiskSpaceChecks" /t REG_DWORD /d 1 f

    gpupdate/force

     

    Boost disk cleanup

    • Operation of disk cleanup
    • Schedule disk cleanup
    • Creating custom cleaners

    To see a list of products of cleaning disk cleanup.

    Start - All Programs - Accessories - right on command prompt and choose run as administrator. Type (or copy and paste by clicking in the command prompt window and choose Paste).

    @echo. & @echo list of cleaners&@echo = & FOR /F "usebackq tokens = 8 delims =-' %i IN ('reg query 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches'") @echo %i

    
     List of cleaners
     ================
     Active Setup Temp Folders
     Content Indexer Cleaner
     Downloaded Program Files
     Hibernation File
     Internet Cache Files
     Memory Dump Files
     Microsoft_Event_Reporting_2.0_Temp_Files
     Offline Pages Files
     Old ChkDsk Files
     Previous Installations
     Recycle Bin
     Setup Log Files
     System error memory dump files
     System error minidump files
     Temporary Files
     Temporary Setup Files
     Temporary Sync Files
     Thumbnail Cache
     Upgrade Discarded Files
     Windows Error Reporting Archive Files
     Windows Error Reporting Queue Files
     Windows Error Reporting System Archive Files
     Windows Error Reporting System Queue Files
     WLX Thumbnail Cache
    
     

Maybe you are looking for