Brennan Posted November 1, 2006 Share Posted November 1, 2006 How would I create a batch file that delete a folder after an amount of days Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted November 1, 2006 Share Posted November 1, 2006 del /F /Q [folder name] then use the 'at' command from the command line to set the date time Quote Link to comment Share on other sites More sharing options...
Brennan Posted November 1, 2006 Author Share Posted November 1, 2006 the folder is going to be different all the time. I am naming it using %DATE:~4,2%_%Date:~7,2% Quote Link to comment Share on other sites More sharing options...
moonlit Posted November 1, 2006 Share Posted November 1, 2006 use the script that's creating it to write the deletion script... ...I'm assuming you can write files from a batch but I've never tried :/ Quote Link to comment Share on other sites More sharing options...
SomeoneE1se Posted November 1, 2006 Share Posted November 1, 2006 use the script that's creating it to write the deletion script......I'm assuming you can write files from a batch but I've never tried :/ command some other command echo yet another command > delete-this-directory-i-no-longer-want.bat at day time delete-this-command-i-no-longer-want.bat Quote Link to comment Share on other sites More sharing options...
Brennan Posted November 1, 2006 Author Share Posted November 1, 2006 sorry I dont understand Quote Link to comment Share on other sites More sharing options...
moonlit Posted November 1, 2006 Share Posted November 1, 2006 use the script that's creating it to write the deletion script......I'm assuming you can write files from a batch but I've never tried :/ command some other command echo yet another command > delete-this-directory-i-no-longer-want.bat at day time delete-this-command-i-no-longer-want.bat lol I completely forgot you could echo to a file... Quote Link to comment Share on other sites More sharing options...
Brennan Posted November 2, 2006 Author Share Posted November 2, 2006 yeah but how would I get the date to change 30 days from then Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.