Skip to content

Instantly share code, notes, and snippets.

@akavel
Last active January 24, 2021 20:04
Show Gist options
  • Save akavel/c2bf51e485676703528f6befea43781d to your computer and use it in GitHub Desktop.
Save akavel/c2bf51e485676703528f6befea43781d to your computer and use it in GitHub Desktop.

Revisions

  1. akavel revised this gist Jan 24, 2021. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion 00-fetch.bat
    Original file line number Diff line number Diff line change
    @@ -18,7 +18,7 @@ for %%F in (*.*) do (
    )
    )
    )
    cd /d %here%
    pause

    cd /d %here%
    endlocal
  2. akavel revised this gist Jan 24, 2021. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion 00-fetch.bat
    Original file line number Diff line number Diff line change
    @@ -4,7 +4,6 @@ setlocal
    :: https://stackoverflow.com/questions/7881035/checking-file-size-in-a-batch-script

    set here=%CD%
    ::echo -%here%-
    cd /d %userprofile%\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_*\LocalState\Assets

    set minsize=200000
  3. akavel created this gist Jan 24, 2021.
    25 changes: 25 additions & 0 deletions 00-fetch.bat
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,25 @@
    @echo off
    setlocal
    :: https://www.groovypost.com/howto/save-windows-10-spotlight-lock-screen-pictures/
    :: https://stackoverflow.com/questions/7881035/checking-file-size-in-a-batch-script

    set here=%CD%
    ::echo -%here%-
    cd /d %userprofile%\AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_*\LocalState\Assets

    set minsize=200000

    for %%F in (*.*) do (
    if %%~zF GTR %minsize% (
    echo %%F
    if not exist %here%\%%F.jpg (
    copy /b %%F %here%\%%F.jpg
    ) else (
    echo ...exists
    )
    )
    )
    pause

    cd /d %here%
    endlocal