F5F Stay Refreshed Software Operating Systems Use Robocopy to remove files automatically

Use Robocopy to remove files automatically

Use Robocopy to remove files automatically

M
meniarc
Junior Member
7
01-29-2024, 02:30 PM
#1
You need to set up robocopy to remove only files older than one day within your scanned documents folder. Make sure the target directory is on your desktop and contains the PDFs you want to delete. Use the correct parameters to filter by file age, ensuring only the relevant files are affected.
M
meniarc
01-29-2024, 02:30 PM #1

You need to set up robocopy to remove only files older than one day within your scanned documents folder. Make sure the target directory is on your desktop and contains the PDFs you want to delete. Use the correct parameters to filter by file age, ensuring only the relevant files are affected.

D
DaniKandor
Member
107
01-29-2024, 04:09 PM
#2
You could simply generate a batch file (with the .BAT extension) using Notepad, saving it and adding the .BAT at the end. Type this inside the batch file: DEL *.pdf. This command removes any files with the PDF extension in the current directory without checking subfolders, keeping your folder intact. If you need to search deeper, use DEL /S *.pdf. The asterisk acts as a wildcard for any characters before or after the extension. You can specify additional filters like date if needed.
D
DaniKandor
01-29-2024, 04:09 PM #2

You could simply generate a batch file (with the .BAT extension) using Notepad, saving it and adding the .BAT at the end. Type this inside the batch file: DEL *.pdf. This command removes any files with the PDF extension in the current directory without checking subfolders, keeping your folder intact. If you need to search deeper, use DEL /S *.pdf. The asterisk acts as a wildcard for any characters before or after the extension. You can specify additional filters like date if needed.

Y
YodaCloud
Junior Member
9
01-29-2024, 04:19 PM
#3
Robocopy is a file copying/backup/mirroring tool, not typically used for deleting files. For tasks like removing specific files, you might prefer forfiles, which can identify and act on files based on attributes (such as deleting those older than a day and ending with .pdf). Adjust the command accordingly to suit your needs.
Y
YodaCloud
01-29-2024, 04:19 PM #3

Robocopy is a file copying/backup/mirroring tool, not typically used for deleting files. For tasks like removing specific files, you might prefer forfiles, which can identify and act on files based on attributes (such as deleting those older than a day and ending with .pdf). Adjust the command accordingly to suit your needs.