Solved Need to delete individual files in a folder

June 10, 2018 at 13:04:40
Specs: Windows 7
I have a folder that has files and subfolders in it.

What im trying to do is to be able to delete the files but not the subfolder
60 mins after they appeared.

I.E If was to click on a subfolder and the files individually appeared in
C:\DOWNLOADS I need the individual files deleted after 60 minuted they appeared
but not the sub folder to be deleted.

Any Ideas how can I do this?


See More: Need to delete individual files in a folder

Report •

#1
June 10, 2018 at 15:13:35
✔ Best Answer
all files but not the folders within C:/DOWNLOADS?
what about the files inside the folders?

could you do this to help me out?

open cmd.exe & type this:

@echo off&mode 1000,1000&pushd "C:\downloads"&cls&dir /A-D/b


explaination (im not formatting youe HDD haha):

echo off: itll turn cmd input return off
mode allows you too see more on the screen than 20 lines,
cls will clear everything before the line
pushd "*" will move the workspace to your downloads folder
dir/A-D/b shows all files in the folder, but no directories ( /b shows the output in plain text )


the result should be all files (so no folders) in C:\downloads

can you confirm for me those are the files you want to delete?

i5-6600K[delid]@4.8GHz/4.4GHz@1.39v LLC=6 | 2x4GB Crucial-DDR4-2133CL15@14-14-14-30 1T 2800MHz@1.37v
MSI Armor RX 570 4GB@1430Mhz core@1.256v/1900MHz BiosModded


Report •

#2
June 15, 2018 at 10:10:26
to delete the files(if the output from the command from my previous post are the files you want to delete):

copy paste in cmd.exe:

@echo off&pushd "C:\downloads"&for /f %a in ('dir /A-D/b') do del "%a"

however this does not take into account the 60minutes, so if you want to me make a special script for you, respond to this thread

i5-6600K[delid]@4.8GHz/4.4GHz@1.39v LLC=6 | 2x4GB Crucial-DDR4-2133CL15@14-14-14-30 1T 2800MHz@1.37v
MSI Armor RX 570 4GB@1430Mhz core@1.256v/1900MHz BiosModded

message edited by hidde663


Report •
Related Solutions


Ask Question