עזרה | מחיקת תוכן תיקייה אוטומטית כל יום/שבוע
-
-
שלום רב,
אשמח לדעת האם יש תוכנה או סקריפט שאפשר להגדיר למחוק תוכן מתיקייה מסויימת כל כמה זמן אוטומטית.
התיקייה TEMP מתמלא כל הזמן ותופס את כל האחסון של המחשב, לא הצלחתי לעלות על הבעיה, השאלה אם יש אפשרות להריץ משהו אוטומטי שימחק את הקבצים.תודה רבה
@צבי
אם אתה מעוניין למחוק את כל תיקיית טמפ
תוכל להשתמש בקוד מהסוג הזה
(לא בדקתי אותו אצלי)@echo off :: Check for administrative privileges net session >nul 2>&1 if %errorLevel% NEQ 0 ( echo Running as administrator... powershell start-process "%~0" -verb runAs exit /b ) :: Delete all files in the temp folder del /q /s "%temp%\*" :: Delete all directories in the temp folder for /d %%x in ("%temp%\*") do @rmdir /q /s "%%x" :: Create the temp folder if it doesn't exist if not exist "%temp%" mkdir "%temp%" echo Temp folder cleaned. pause
ולהגדיר במתזמן המשימות הפעלה של הסקריפט פעם אחת בשבוע
נ.ב בפורום יש כמה נושאים של פינוי מקום במחשב אולי משם תבוא הישועה
-
-
@צבי
אם אתה מעוניין למחוק את כל תיקיית טמפ
תוכל להשתמש בקוד מהסוג הזה
(לא בדקתי אותו אצלי)@echo off :: Check for administrative privileges net session >nul 2>&1 if %errorLevel% NEQ 0 ( echo Running as administrator... powershell start-process "%~0" -verb runAs exit /b ) :: Delete all files in the temp folder del /q /s "%temp%\*" :: Delete all directories in the temp folder for /d %%x in ("%temp%\*") do @rmdir /q /s "%%x" :: Create the temp folder if it doesn't exist if not exist "%temp%" mkdir "%temp%" echo Temp folder cleaned. pause
ולהגדיר במתזמן המשימות הפעלה של הסקריפט פעם אחת בשבוע
נ.ב בפורום יש כמה נושאים של פינוי מקום במחשב אולי משם תבוא הישועה
-
@צבי
אם אתה מעוניין למחוק את כל תיקיית טמפ
תוכל להשתמש בקוד מהסוג הזה
(לא בדקתי אותו אצלי)@echo off :: Check for administrative privileges net session >nul 2>&1 if %errorLevel% NEQ 0 ( echo Running as administrator... powershell start-process "%~0" -verb runAs exit /b ) :: Delete all files in the temp folder del /q /s "%temp%\*" :: Delete all directories in the temp folder for /d %%x in ("%temp%\*") do @rmdir /q /s "%%x" :: Create the temp folder if it doesn't exist if not exist "%temp%" mkdir "%temp%" echo Temp folder cleaned. pause
ולהגדיר במתזמן המשימות הפעלה של הסקריפט פעם אחת בשבוע
נ.ב בפורום יש כמה נושאים של פינוי מקום במחשב אולי משם תבוא הישועה
-
הסתדרתי עם התוכנה https://www.majorgeeks.com/
והוספתי את השורהif not "%1"=="am_admin" (powershell start -verb runas '%0' am_admin & exit /b)
כדי שיפעיל כמנהל.
תודה רבה