Menu
Windows 7/SP3/64-bit, 16GB RAM, Avira anti-virus, also scanned by MalwareBytesAntiMalware. Was using Thunderbird 38.5.0. Upon updating to version 38.6.0 yesterday all of the non-default message subfolders in my main POP3 account disappeared. Most of the messages in them were then lumped into my main Inbox. I was able to retrieve most of the messages by uninstalling Thunderbird, cleaning the Windows Registry with Ccleaner, installing a clean 38.5.0, and recovering the Thunderbird profile named 'travel' from a day-old Acronis TIH backup. Upon examining the contents of the old profile I wonder if it has been corrupted.
See the attached image of its contents. The name of the profile is 'travel.' My main account is '.'
One subfolder, 'Westminster.sbd,' has been expanded to be viewed in the right-hand pane. I note that some of the subfolders (Carriage House, Dad, Westminster) have duplicate '.mozmsgs' folders under another 'main' folder named 'pop.1and1.com.sbd.' Also in that folder is a subfolder named 'PayPal.mozmsgs' that does NOT appear in the larger '.' Is there a practical way to get a clean start of the mailboxes and move the desired subfolders from my backup copy into it? What should the 'Mail '.mozmsgs,.sbd,.msf, and non-extension folder tree hierarchy look like? Did the handling of these subfolders change from version 38.5.0 to 38.6.0?
Windows 7/SP3/64-bit, 16GB RAM, Avira anti-virus, also scanned by MalwareBytesAntiMalware. Was using Thunderbird 38.5.0. Upon updating to version 38.6.0 yesterday all of the non-default message subfolders in my main POP3 account disappeared. Most of the messages in them were then lumped into my main Inbox.
I was able to retrieve most of the messages by uninstalling Thunderbird, cleaning the Windows Registry with Ccleaner, installing a clean 38.5.0, and recovering the Thunderbird profile named 'travel' from a day-old Acronis TIH backup. Upon examining the contents of the old profile I wonder if it has been corrupted. See the attached image of its contents.
The name of the profile is 'travel.' My main account is 'pop.1and1.com.' One subfolder, 'Westminster.sbd,' has been expanded to be viewed in the right-hand pane. I note that some of the subfolders (Carriage House, Dad, Westminster) have duplicate '.mozmsgs' folders under another 'main' folder named 'pop.1and1.com.sbd.' Also in that folder is a subfolder named 'PayPal.mozmsgs' that does NOT appear in the larger 'pop.1and1.com.' Is there a practical way to get a clean start of the mailboxes and move the desired subfolders from my backup copy into it? What should the 'Mail pop.1and1.com '.mozmsgs,.sbd,.msf, and non-extension folder tree hierarchy look like?
Did the handling of these subfolders change from version 38.5.0 to 38.6.0? Matt, I successfully updated to 38.6.0 without the previous multiple crashes. It must have been the corrupted caches you mentioned.
Because I make daily backups, any messages I might have lost were still on my host's server. I can confirm on two different Win 7/64 installations that 'parent.lock' survives closing Thunderbird and re-booting Windows. I checked the running processes and services and found no hint of any remaining stubs. If Thunderbird is re-started the file date and time just change to the current value.
The presence of 'parent.lock' no longer prevents the program from starting. Thank you again for your help. Your observations and findings were accurate, your explanations were easy to understand, and your suggestions fixed the problem. These qualities are all too rare on today's Internet Help Forums. Your mozmsgs are for windows search. If you turn the option off you can delete the folders and their thousands of files. In my case it was a many GB of files.
The large files you see in the expanded view are what are displayed as folders in Thunderbird. This varies if you use the unified view. Issues like you describe are more often than not cused by an update not applying to cached structures properly and deleting the file xulstore.json can clear it up. Foldetree.json and panacea.dat can also be deleted to force a clear out of the caches settings. Sessions.jsan can also be deleted, but it will revert the main interface to default. So the reading pane will be on etc. Your mozmsgs are for windows search.
If you turn the option off you can delete the folders and their thousands of files. In my case it was a many GB of files.
The large files you see in the expanded view are what are displayed as folders in Thunderbird. This varies if you use the unified view. Issues like you describe are more often than not cused by an update not applying to cached structures properly and deleting the file xulstore.json can clear it up. Foldetree.json and panacea.dat can also be deleted to force a clear out of the caches settings. Sessions.jsan can also be deleted, but it will revert the main interface to default. So the reading pane will be on etc.
Parent.lock should be deleted on shut down. The others, are mostly password files. I assume from that you have not had reason to change them recently. I am not sure what the mailviews.dat file does. But it is small so it is not something I would worry about. It is probably created by an add-on as I do not have one. I am not really aware of a full list of the files in a profile.
But this one discussed the important stuff and goes very close http://kb.mozillazine.org/Filesandfoldersintheprofile-Thunderbird. Matt, I successfully updated to 38.6.0 without the previous multiple crashes. It must have been the corrupted caches you mentioned.
Because I make daily backups, any messages I might have lost were still on my host's server. I can confirm on two different Win 7/64 installations that 'parent.lock' survives closing Thunderbird and re-booting Windows. I checked the running processes and services and found no hint of any remaining stubs. If Thunderbird is re-started the file date and time just change to the current value.
The presence of 'parent.lock' no longer prevents the program from starting. Thank you again for your help. Your observations and findings were accurate, your explanations were easy to understand, and your suggestions fixed the problem. These qualities are all too rare on today's Internet Help Forums.
Matt, I successfully updated to 38.6.0 without the previous multiple crashes. It must have been the corrupted caches you mentioned. Because I make daily backups, any messages I might have lost were still on my host's server. I can confirm on two different Win 7/64 installations that 'parent.lock' survives closing Thunderbird and re-booting Windows. I checked the running processes and services and found no hint of any remaining stubs.
If Thunderbird is re-started the file date and time just change to the current value. The presence of 'parent.lock' no longer prevents the program from starting.
Thank you again for your help. Your observations and findings were accurate, your explanations were easy to understand, and your suggestions fixed the problem. These qualities are all too rare on today's Internet Help Forums.
Trust us: we’re well aware that this was way easier in Windows 2000. But at least now we’re ready to start deleting folders. If you look at the items in our array, they happen to be exactly opposite of what we need; for example, the Archive folder is the first item in our array, but it has to be the last item that we delete. If we could invert the array - making the first last and the last first, to steal a phrase - we’d be in business. That’s where this block of code comes in: For i = Ubound(arrFolders) to 0 Step -1 strFolder = arrFolders(i) strFolder = Replace(strFolder, ' ', ' ') Set colFolders = objWMIService.ExecQuery ('Select. from Win32Directory where Name = ' & strFolder & ') For Each objFolder in colFolders errResults = objFolder.Delete Next Next What we’re doing here is reading our array from the bottom up.
We’re creating a loop that starts with the very last item in the array; that’s what the Ubound (upper bound) function is for. We’re then going to work our way down to the first item in the array: item 0. (As you might recall, the first element in an array is always item 0, not item 1.) The Step -1 function just means that we step backwards rather than forward: instead of going 0-1-2-3, we’re going 3-2-1-0.
This is how we can start deleting at the bottom of the tree. Of course, before we can do that we need to adjust the folder paths; that’s what we do here: strFolder = Replace(strFolder, ' ', ' ') Our folder paths are going to look like this: C: Scripts Archive Subfolder A1 Subfolder B1. That’s fine, except that we need to include these paths in a WQL query.
Consequently, we need to double up all the ’s, resulting in paths that look like this: C: Scripts Archive Subfolder A1 Subfolder B1. We use the Replace function to replace each with. You’re right: there’s nothing straightforward about this script, is there? With our new folder paths we can then use WMI to connect to the folder in question and - at long last - use the Delete method to actually delete the folder. That’s what happens here: Set colFolders = objWMIService.ExecQuery ('Select. from Win32Directory where Name = ' & strFolder & ') For Each objFolder in colFolders errResults = objFolder.Delete Next Having disposed of Subfolder B1, we can then start working our way up the tree, eventually deleting C: Scripts Archive. Five million lines of code later, we’re done, and C: Scripts Archive has been deleted.
We’re not saying it’s a particularly elegant solution, but it is a solution, and it will work on all versions of Windows. And because it uses WMI, it works equally well on remote machines as it does on the local computer.
So there you have it: deleting a folder and all its subfolders, a subject we’ve vowed never to deal with again. Well, at least not until the next service pack comes out.
Hi, I have an Office 365 Account. In August 2012, my system crashed and I had to reinstall all software. I had been storing all my Office 365 mail data in a.PST file. To save the trouble of downloading all my mails again, I just backed up all data from the.PST file. I later observed that when I connected to the internet, all my mails started downloading again as a result of which I have a lot of duplicates mails in various Outlook mail sub folders.
How can I delete these duplicate mails from Outlook and the server. I am in the same boat with you. I used a 3rd party program called Osasync to sync my desktop and laptop so that Outlook would appear identical on both. It was a nightmare.
I had tons of error messages, Outlook froze up about 6 times a day and I had to alt/ctrl/del to get out, and it took an entire day to sync. So I uninstalled that awful program from both computers and when I re-synced Outlook, it brought in 12,000 messages to my sent email box (from the cloud storage where the sync emails were stored). There were 6 of every email. The Outlook clean up tool does not work. I just get an error message saying that none of the dupes meet the standards set for the cleanup tool, or something like that. So just wondering if you have found a way to get rid of your dupes.
I am petrified to try 3rd party solution since I had such a bad experience last time I waded into that water. Hi CaroleAnnAustin.
976630 wrote: Hi, My testing scenario is to delete all the rman backup pieces older than 2 days. ThanksI didn't ask what your test scenario was. I asked what it revealed. In other words, by testing yourself, you'd have your answer.
As Hemant said, you need to set your retention to a recovery window of two days. But you also need to be aware that rman will not consider a backup obsolete until it is no longer needed to guarantee that recovery window. Think about the implications of that, while keeping in mind that all recovery must start with a FULL (full or incremental 0) backup. So, let's say you set your recovery window to 2 days. And you immediately take an Incremental 0 backup, followed by daily Incremental 1 backups and archivelog backups. All well and good, but for the sake of illustration, let's suppose you don't take another Incr 0 backup for another month.
During that entire time, that first Inc 0 backup is still needed to be able to recover into the last two days, and so will not be considered obsolete until (recovery windows) days after the next inc 0 backup. Also, please note that backups are not marked as obsolete by the simple passing of time. They are evaluated for obsolete as part of processing an rman command that involves obsolete - such as DELETE OBSOLETE or REPORT OBSOLETE.
I leave it as an exercise for the student to work out the scheduling in his own system. I am just getting into powershell and looking for any help in the right direction. I would like to accomplish a script that will search folder and its subfolder for files older than x number of days. And then be able to delete those files. In the process after deleting files, search for empty folders and delete them.
Would anyone have insight into this? I know of the forfiles command and have seen some that do part of this separately but nothing that goes together. Any help would be apprecitated.
Hi, I am in search of a script which will delete items is public folder which are older than 90 days. I came across below pasted VBscript. This script works in the test environment but in production due to huge volume of item in public folder this script is not working. Good Day, Can you please advise of a way to delete a folder that is x days older than the current date? For example, I have a folder containing 30 or more folders of log files, 1 for each day of the month.
I would like to keep the last 10 folders from the current date, then delete all folders that are older than that. If today is June 11, keep all folders including June 1st, then delete folders older than June 1st. Is there any syntax that can be used to delete folders named as such 201047 but keep ones with text in them, like Install folder? Thanks for your help with this, just not sure how to go about doing this. Regards, it workaccount09. 'Users/jackman/Downloads' is not a valid path.
If using POSIX paths it would need a leading /, so: '/Users/jackman/Downloads' would be more appropriate. However, this is not the best practice since it locks you into a specific directory. A better approach would use the 'path to' command (as shown above) which locates specific directories based on the current system settings (e.g.
User home directory, etc.). So you should try: tell application 'Finder' delete (every item of (path to downloads folder) whose modification date is less than ((get current date) - 1. days)) end tell That's is - exactly as written. AppleScript will automatically lookup the current user's Downloads folder at runtime to determine which folder to look in (and therefore which files to delete). In looking for a solution to this problem, I'm confused as to whether an applescript, folder action, automator workflow, a shell script running on a crontab or some combination of any of the above would be the simplest way to acheive my goal.
A root folder exists on my server where we drop folders/files for clients to ftp. Based on the modification dates of these files, I'd like to automatically delete all folders if they are older than X days. The only rub is, that there may be 1 or 2 folders that I don't want this rule to apply. Thanks -Steve G5 1.8 SP Mac OS X (10.4.8).
Hello everybody. I'm not sure how to accomplish this, so figured I'd post here. What I want to do is have a scheduled task that looks at c: FolderName, looks through all of FolderName's subfolders and deletes any files whose timestamp is older than 30 days. Then I'd like it to delete any empty subfolders of FolderName, as it will probably create empty subfolders the majority of the time when it actually deletes files.
Is there a way to do it with a batch file or vbscript? Thanks in advance for your replies. Hi FUN Following this thread I suddenly remembered that I have something in my box which needed only a bit of change to cover your requirements. Have a look at the code below. I changed your 'modate' part in the clause to 'coalesce(modate,crdate)' as I saw in the dictionary table that there are entries with a blank modate. HTH Patrick%macro CleanUpLib(CleanupLib=); options mprint;%local dropmems; proc sql noprint nowarn; select catx('.'
,libname,memname) into:dropmems separated by ',' from dictionary.tables where libname =%upcase('CleanupLib') and memtype='DATA' and today-datepart(coalesce(modate,crdate)) 2;%if dropmems ne%then%do;%put. Tables will be dropped.;%put Dropmems=dropmems; drop table dropmems;%end;%else%do;%put. No tables to be dropped.;%end; quit; run;%mend;%CleanUpLib(CleanupLib=MyLib) Message was edited by: Patrick. I'm trying to delete the files including folderswhich are older than 2 days using the following script. Forfiles -pc: accounting archive -s -m.d-2 -cCMD /C RMDIR /s /q @PATH before executing script: c: accounting archive daily 2010-07-21 abc.rpt c: accounting archive daily 2010-07-23 abc.rpt c: accounting archive weekly 2010-07-23 abc.rpt but it's deleting all the files and folders under daily. After executing the script: c: accounting archive daily c: accounting archive daily c: accounting archive weekly 2010-07-23 abc.rpt It should not have deleted c: accounting archive daily 2010-07-23 abc.rpt How to correct this?
Mar 10, 2011. 124152623|Ron_C_-_The_C_Theory.rar|52544 posted by Zielony o 10:22 PM. Labels 1994, Ron C. Ron C - The C Theory (1994) Ron C. Ron c the c theory rarlab. Buzz Marketing With Blogs For Dummies. C Game Programming for Dummies 2. C++ for Dummies 5th Edition (2. C++ For Dummies, 5th Edition. C++ Timesaving Techniques For Dummies (Wiley, 2. Find a Ron C - The 'C' Theory first pressing or reissue. Complete your Ron C collection. Shop Vinyl and CDs. Sep 29, 2009 RON C Most Banging Track on this Album: the C theory Released September, 1994 This 1 for the Real G's / Ballers Thanks to My BIG Homie Chavo! Ron C The C Theory Rar Files. 5/20/2017 0 Comments Official Tickets and Your Source for Live Entertainment. By clicking Next, you agree to the AXS.
I'm trying to delete the files and and also the file containing directory(one level). I'm trying to delete the files including folderswhich are older than 2 days using the following script.
Forfiles -pc: accounting archive -s -m.d-2 -cCMD /C RMDIR /s /q @PATH before executing script: c: accounting archive daily 2010-07-21 abc.rpt c: accounting archive daily 2010-07-23 abc.rpt c: accounting archive weekly 2010-07-23 abc.rpt but it's deleting all the files and folders under daily. After executing the script: c: accounting archive daily c: accounting archive daily c: accounting archive weekly 2010-07-23 abc.rpt It should not have deleted c: accounting archive daily 2010-07-23 abc.rpt How to correct this? I'm trying to delete the files and and also the file containing directory(one level). Make sure that you have both file level and share level permissions to the directory.
If you run the script as the farm account (if the backup was taken through the UI) or the account that runs your PowerShell backups (if the backup was taken using PowerShell) then you should be able to modify the file and delete the folders.Roger Cormier Microsoft Premier Field Engineer, SharePoint Blog: Twitter: LinkedIn: Note: My posts are provided “AS IS” without warranty of any kind, either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. Hi everyone, I am looking for a script for deleting log files older than. Here is the situation: We got a SQL Server that generates full backups and log backups. These backup's are in different folders like: Folder 1 (logfiles), Folder 2 (logfiles) etc. Now my intention is to run this script every week / day, so it deletes the files within these maps that are older than let's say 3 days.
Also I need this script to delete the full backup files, that are older than 2 weeks. Can anyone help me out with this one?
I am not a scripter, but I really need some examples to study on. Thanks in advance! Greets, Kerim Tupkovic. Hi all, I need your helpwriting a script to delete folders from a specific folder which are few days oldin Windows 2003. I have another script running thatcreates backup for each day of the week (creates folder Monday to Sunday) in a folder say 'e: backups'. I need a script that I'd schedule to check the date under 'E: backups' (those 7 folders created for mon- sun) and delete those older than 3 days (that means always keep the last 4 days worth of backup). If this is helpful for you - I came across a similar script written by AssafDailyDeleteFiles.vbs - but with my limited knowledgeI'm not able to customize it.
This DaisyDeleteFiles.VBS would be helpful to me if I could simplifyAssaf's codes to: 1. Just delete those folders that are older than certain days (say 3 days) - this deletes all files and sub-folders within it (so no need to check dates recursively). For simplicity sake I even don't need logs created for this. Appreciate you looking into this. Many thanks in advance! BlueSky - you were on the right track and your comment helped me. I had the same issue but I was trying del which wasn't working.
I think you just need to use the /S switch for rmdir. I had been using @file with del andrunning thetest command from the parent folder.Changing it to rmdirworked: forfiles /m. /d -1 /c cmd /c if @isdirTRUE echo @file is a directory and will be deleted rmdir /S /q @file where I was running from, say c: test instead of c: so I didn't need to specify path HTH, Embeegee.
Hello, We've got a HUGE folder where we keep copies of databases, contracts, documentation etc etc for years and years. The data we generally receive or store as.zip files, but from time to time someone needs to look at it, so it's unzipped and forgotten. I've had the long talk about how unneccessary and wasteful this is, but the owners still want it. Just in case of something. Some of these files are database dumps 1gig, sorted in about 400 folders with 5-8 subfolders each, which again can have 10 subfolders. A nightmare to keep tidy.
What would help me greatly is a script that does the following: - Finds all.mdb, ldb, mdf, bak, dmp files older than 180 days and zips them as individual files in the same folder, keeping the filename (but of course changing extension to.zip), and then deletes the original files. Exception: If there is already a.zip file with the same name, I'd like a log/report telling me where, so I can compare dates of the original file and the one in the.zip file (and delete the original if they are the same). Or can this part be scripted as well? EDIT: Can date of the original file be included in the.zip (originalname-date.zip)? - Finds all.TXT files older than 180 days and bigger than 10MB, zips them as individual files in the same folders and keeping filename (extension change ok) and then deleting the original file. Deletes all empty folders (because users tend to be locked out from deleting folders because of thumbs.db) Any good ideas or links? I've had rotten luck finding anything doing exactly or close to this, and I'm pretty rotten at scripting.
I'd like to run this script every weekend as a scheduled task. Best regards and have a nice weekend!
Hello, i am new to powershell. I am trying to delete some files folders from remote computers (server-1, server-2. Server-3, server-4) Some are windows 2003 server are some are 2008 folders to be deleted from server are been imported to script from files.txt (c: temp., c: Windows temp., c: recycler., c: documents and settings.except Default, All users,Administrator. 60 (profiles older than 60 days) c: windows $NTUnunstaller, 30(older than 30 days), c: users. except Default, All users, Administrator c: $abcd$.
30 i am looking for script in powershell. Which should support windows 2003 and win 2008 server Deleted file log should be saved to log.txt with date WinRM is Disabled in my network thanks in advance Thanks, jeevan.
I need a script to delete files older than 4 days, but I won't know the name of one of the folders in the path. In other words, Folder1 contains many folders that I do not know the name of, and each of those folders contains a folder named Download, which is where I need to find and delete files older than 5 days. Folder1. Download. older than 4 days. I don't know how to do this w/o knowing the name of the middle folder.
I know it's doable. I assume I'd need to find the name of middle folders and store them somewhere, and then insert those names as a variable in the path. Thanks in advance.
I have been asked if it would be possible to do the following with PowerShell. Script prompts user for txt file containing a list of directories. Script parses that file, searches the list of directories (and subdirectories) for files older than 90 days and deletes them with no confirmation prompt. I know how to search for files by date and I think I can figure out how to delete them with no prompt, but can PowerShell read/parse a text file and then apply the conditions to all files in those folders and their sub-folders? I have an e-mail account and I have chosen, both at 'Tools Account Settings account name Disk Space' and 'Tools Account Settings Local Folders Disk Space', the option 'Don't delete any messages'. However, in the Inbox folder of this account I have created a subfolder, i.e. I want the messages of this subfolder that are older than 2 days old to be deleted from both my pc AND the server.
So, at the 'Folder Properties Retention Policy' of the folder 'test', I have chosen the option 'Delete messages older than 2 days'. The problem is that the messages are indeed deleted from my pc but not from the server. I have also tried to create a filter for this, but with no success. How can I fix this? Thank you in advance.
If you never want any emails to be deleted off the server by Thunderbird then use the options in (A) below: select: 'Leave messages on server' deselect: 'For at most eg: 30 days' deselect: 'Until I delete them' - only select 'Leave messages on server'. If you only want emails you delete to be removed off the server, then use options as described in (B) below: select: 'Leave messages on server' deselect: 'For at most eg: 30 days' select: 'Until I delete them' do not select the 'For at most eg: 30 days' option. The 'Retention Policy' tab for each folder means emails would be deleted off computer AND server option, it works as an additional option to Disc Space as set in account settings. So if you have set this up for the 'test' folder, then you would need to use the settings in Account Settings that are the same as (B) above. This would save you from manually deleting any deleted items off the server, but keep all other emails on the server. This is how to make this option automatic and work, but it will delete those items off the server.
It does not work if you have issued instructions to never delete off server under Account Settings Disc Space and also selected to 'Leave messages on the server' but not selected any of the delete options. To leave all emails on the server regardless of whether you have deleted them in Thunderbird, but delete emails from a specific folder in thunderbird only, you need to select the options as described in (A) above.
You could set up a Message Filter: 'Tools ' 'Message Filters' and call it eg: 'empty test', to 'Manually run' and 'match all of the following' to filter any emails sent TO your email address (this should include all emails, but if you need to add another condition for another email address, then remember to set 'match any of the following') and perform the action to 'Delete Message', but as Message Filters only run automatically on the Inbox, you would need to do one of the following: select the 'test' folder 'Tools' 'run filters on folder' emails will be sent to Deleted folder. Or open Message Filters, select only that filter, then 'run selected filter on' and choose the folder, then click on 'Run now'. Only the 'Deleted' and 'Junk' folders have the manual option to 'Empty Folder' by right clicking on folder and selecting that option.
Otherwise, you would need to select the folder, highlight all emails using Ctrl+A and then use the delete button. You can also set up Thunderbird to auto Empty the Deleted folder when you exit Thunderbird in Account Settings Server Settings. Remember to compact the 'test' folder on a regular basis.
Either right click on folder and select 'compact' or you could compact all the folders in the account: 'File' 'Compact Folders'. You can also set up auto compact options in 'Tools' 'Options' 'Advanced' 'Network disc space' and select to 'compact all folders when it will save over eg: 10 MB in total.' What is your databse version? Anyway you might review the following note; In Oracle8i, the FROM/UNTIL. TIME syntax in the LIST, CROSSCHECK, and DELETE commands was replaced with completedTimeSpec.
If you are adapting an RMAN script from before Oracle8i for use in the current release, then you must update these commands for the script to work correctly. (Extracted from the link below) Therefore it is a replacement. CompletedTimeSpec Hope it helps.
Hi, Thanks for your post. I understand that you are looking for a scripted solution for auto archive settings in Outlook. However, thisforumfocuses onquestions and feedback for Microsoft Office client.
I would suggest you to post in the forum of Script CenterScripting Forums, where you can get more experienced responses: The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding. Regards, Ethan Hua TechNet Community Support It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs. Hi, I am looking for a script that deletes folders with date format ddmmyyyy. These folders contain a lot of subfolders and files. I am interested in deleting folders that where CREATED (during backup) on a certain date= folders older than (as from creation date) older thatn 7 days.
So i have a folder structure. D: bacups prod backupsfolders - backupfolders have date name ddmmyyybackupname. Thse backupsfolders must be delete entirely older than 7 days I have found a script on this link. I tested it but does have the correct result. YOu need to remove teh On Error Resume Next to see your errors and fix them. Please start a new question as this one has been closed for quite a while. Include your script and a clear explanation of what is not happening or causing errors.
I highly recommend removing the //B from the command line. It iwill pervent you from seeing teh errors you are getting. See the section on error handling in the 'Learn'; section of this site.
Errors should not ever be turned off at the beginning of a script. You need to handle all errors as they happen or you will get very unpredicatable results and can even cause damage.
Hi currently we have the following script to delete pdf files and folders older than five days in windows.We need to convert this.vbsscript to shell script.We dont need mail and all.Any advice or any one has this script.' This script is setup to delete pdf files and folders older than 5 days' trimdays - Number of days to keep. Folders older than this number of days are deleted.' Sourcepath - local path on the server where this is run.'
Debug - If set to 1, the folders are analyzed, but not deleted.' If set to 0, folders are deleted.' 'Const ForAppending = 8Dim Trimdays, sourcepath, returncode, debugtrimdays = 5sourcepath = 'c: winnt temp aquapd1500'debug = 0returncode = TrimFolders(trimdays, sourcepath, debug)' Trim Folders'Function TrimFolders (Days, Source, debug)' Description: Function to trim all folders in a path that are older than' a specified number of days, based on the current date and the folder' creation date.' ' Parameters:' -' Days - Number of days to keep.' Source - Source path on the local machine' debug - if set to 1, only report, do not delete.'
Dim objFSO, objFiles, objFolderDim SourcePath, IndividualFileDim ResultFile, ResultFileNameDim TrimDateDim DaysToKeepDim SubFolderPathDim DirCount' Set the number of days to keep. Hi, Check if this link helps: Since your question is more related to script, I'd recommend you post a question in the Outlook for Developers forum for better coding assistance: The reason why we recommend posting appropriately is you will get the most qualifiedpool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding. Steve Fan TechNet Community Support It's recommended to download and install Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office programs.
Hi All,Is there a way I can automatically delete user profiles that are older than for example 6 months on a Terminal services server?I'm not sure if it is sufficient to just delete any folders that are older than 6 months in the c: documents and settings folder and whether that actually constitutes a clean way to delete a profile.I would like to script this task and have it check every week for any profiles that are older than 6 months that havent been used and delete them off the system.Any help greatly appreciated. Hi everybody I've a problem. I havesome folderswith timestamps (format 2012-01-16 T2205) and now I want to delete the folders that are older than like 60 days automatically from a batch file. The following script works pretty fine, except that it can't manipulate%f.
Can someone help me? Thanks a lot:) for /F tokens=.%%f in ('dir /B /O:GN C: test') do ( set /a fileage=%date:6,4%.365%date:3,2%.30%date:0,2% set /a fileage=fileage-%%f:1,4%.365-%%f:6,2%.30-%%f:9,2% if fileage GTR 60 ( rmdir C: test%f ) ). Try this script (paste it into Script Editor). I strongly recommend that you archive the mailbox you are going to try it on first. Make changes in the first two lines of the script. When you run it it will display the subject of each message that the script finds. If the found messages seem like the ones you really really (no come back!) want to delete put two dashes (-) at the start of the line that begins 'display dialog' and remove the two dashes at the start of the next line, which begins 'delete'.
Now when you run it it will delete those messages. If it seems OK when run manually then try putting an event in iCal with this script as the alarm. If that works OK, then make the event repeat. AK click here to open this script in your editorpre style='font-family: 'Monaco', 'Courier New', Courier, monospace; overflow:auto; color: #222; background: #DDD; padding: 0.2em; font-size: 10px; width:400px'set Interval to 30 - change to suit set TheBox to 'Hold' - change to suit set Today to current date set OldDate to Today - Interval. days tell application 'Mail' set OldStuff to every message of mailbox TheBox where date received of it OldDate repeat with ThisMessage in OldStuff display dialog (subject of ThisMessage) as text - delete ThisMessage end repeat end tell /pre.
Hi, I am looking to delete files which are older than 14 days on a particular share, i see that there are alreadyvarious other versions of the script present but they do not seem to work since the share contains folder exceeding the 256 character limit for windows. I tried the same through Robocopy which seems to ignore the character limit but it removes the files from folders which are not 14 days old. What i would rather prefer is that it skips all folders which are less than 14 days old and remove folders/files which are older.
Please suggest if this can be edited inany way or some other script which ignores 256 character limit and does the job.:: Removing 14 days old data::. SET source= server share SET dest= server shareToDelete SET what= /S /E /Move:D /MINAGE:14 SET options=/LOG:BackupHistory.log /NS /NP /FP /NDL /xf filename /r:1 /w:0:: /LOG:file: Output status to LOG file (append to existing log).:: /NS: No Size - don’t log file sizes:: /NDL: No dir logging:: /FP: Include Full Pathname of files in the output.:: /NP: No Progress - don’t display% copied.
ROBOCOPY%source%%dest%%what%%options% RMDIR%dest% /q /s Thanks In advance. Hi Does anyone know of a utility or a way to delete files/folders older than a specified date automatically say every week etc. We have a temporary folder which users are supposed to keep organized themselves, but don 't so we want a way to do it automatically. I 've found a old freeware nlm called CleanVol, where you specify the day, files/folders and how old the files should be (e.g 30 days) and it deletes them, but it 's very old and would rather find a paid-for-product or a more uptodate way. The server is NetWare 6.5, and we have ZENworks for Servers 6.5 on it too, incase theres any way of doing it that way. Any ideas would be great. This thread has been closed.
Please start a new thread with a clear statement of your problem. One suggestion is to never use 'On Error Resume Next' at the beginning of a script. If you turn off error handling then you must manage the errors on any line that can generate an error. See the section on this site under 'Learn' on error handling for a complete discussion of how to use error handling in VBScript. After removing the On Error post you question along with the error messages to a new thread. My WHS runs well and Microsoft did a great job - but: 1.
Every User likes the Feature to store Data on the WHS, thats good, but after a while, the Server runs out of storage. Quota is only available on Harddrives, but in W2K3 R2 quota are available on folders. That would be a nice Feature. It would be nice to define the Type of Data thats allowed to store on the WHS, so the Parents have the ability to control what the Kids store.
How Many Files In A Folder
It would be nice to have a Feature which delete Data older than xxx Days in an defined folder. At the moment I´m using a VB-Script to erase Data older then 30 Days. My WHS runs well and Microsoft did a great job - but: 1. Every User likes the Feature to store Data on the WHS, thats good, but after a while, the Server runs out of storage.
Quota is only available on Harddrives, but in W2K3 R2 quota are available on folders. That would be a nice Feature. It would be nice to define the Type of Data thats allowed to store on the WHS, so the Parents have the ability to control what the Kids store. It would be nice to have a Feature which delete Data older than xxx Days in an defined folder. At the moment I´m using a VB-Script to erase Data older then 30 Days. I understand that AV2 handles this, but I am using AV1 and had the need to seriously delete recordings on a 14 Aircam install, where the NVR writes recordings quicker than I can tell Airvision to delete them.
I have come across a cool batch script, that I am now running as a scheduled task every morning, to delete any files in the events folder older than 14 days. Maybe someone else with the same issue as mine, can also use this. This is Windows based, not linux. I have my recordings stored on a network drive, so this is my simple batch script (For Win7). Forfiles -p 'X: ubiquiti nvr1 events' -s -m.
/D -14 /C 'cmd /c del @path' I am now using this change in my script to see what is actually happening / being deleted. Forfiles -p 'X: ubiquiti nvr1 events' -s -m. /D -14 /C 'cmd /c del @path cmd /c echo Deleting file: @path' Credit to this SO answer here. Fade-DudevanTo Technologieswww.vanto.co.za. Fun with intermittent issues. I have a simple script that runs on task to clear outold folders from a series of servers. Simple pseudocode - get servername get and validate folder root location server share loop through subfolders if older than 30 days then delete This works for 99% of the folders i am trying to clear, but occasionally i get the following.
Path = MYSERVER images$ Zerotouch Migration W1234567 MYSERVER images$ Zerotouch Migration W1234567:76:Path not found I can copy and paste the foldername into the run command window(start-run) and it will open the folders. From here I can delete the folders manually. I have tried adding a backslash at the end of the subfolder name and get the same error. Whenthis occurs for a specific folder i can run the script 100 times and the same folder will always give me 'path not found' My actual script is longer, but this gives the same results and shows you that i am dynamically getting the folder names from the subfolders method, thus showing it is not a typo on my part. Idon't believe that is too long.
It is just telling you that that is the longest file naem and path that teh tool found. 253 characters is not too long. Permission denied comes from the ACL settings. Somehow you are getting the wrong message. If you can see a folder in Explorere is is not topo long to delete. Ther is one other possibility.
The directory is infected with a virus that hides at teh end of the file name. It creates a condiition that makes the file impossible to delete and may give either permission denied or file name too long errors when the file name is NOT too long. It can aslo be caused by damaged security descriptor file or directory file. Run CHKDSK to elimate two of these possibilities. Hi, If you enable this setting, then cached profiles that are older than the threshold that you specify are deleted, about this setting, you may get more information via the following link: We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Then you need create a list with all Excludes, not only the name of the folder audio, you need the fullpath C: projects project1 blabal bla audio, C: projects project1 video. You mustchange the if parto work with the list, you can use the StartsWith String function, to compare the actuel path with the list, but the startswith is casesensitiv Example: PS E: scripte C: A B C Audio x y.StartsWith(C: A B C Audio) True PS E: scripte C: A B C Audio x y.StartsWith(C: A B C AUDIO) False you can fix this in this way: C: A B C Audio x y.ToLower.StartsWith(C: A B C AUDIO.ToLower). Hello, We are using RMAN backup to disks and were successfully able to configure and backup the database, but I am trying to find a way to retain backups that are less than 10 days and delete any obsolete backups. I am creating a script that RMAN executes the backups and deletes them.
I am using Redundancy of 3 backupsets and am trying to backup to disk. Can I use DELETE BACKUPS UNTILL TIME 'SYSDATE-10'? In my script to delete any backup files that are older than 10 days? Any help is much appreciated.
Imo A) CONFIGURE RETENTION POLICY TO RECOVERY WINDOW OF 10 DAYS; DELETE NOPROMPT OBSOLETE; should not be exactly the same as: B) delete backup of database completed before 'sysdate-10'; A backup 'completed before sysdate-10' can still be in the recovery window. Imagine if your last level 0 backup is 100 days old and you only did level 1 backups after that for example! I would say that A) and this command would give similar results: C) delete noprompt obsolete recovery window of 10 days; Difference is that you don't modify the rman recovery window setting in the controlfiles with this C) command. = C is useful if you backup via a standby database (if you want to use a different recovery window) Edited by: Phil Florent on Aug 21, 2010 3:14 PM.
Hi currently we have the following script to delete pdf files and folders older than five days in windows.We need to convert this.vbsscript to shell script.We dont need mail and all.Any advice or any one has this script. ' This script is setup to delete pdf files and folders older than 5 days' trimdays - Number of days to keep. Folders older than this number of days are deleted.' Sourcepath - local path on the server where this is run.' Debug - If set to 1, the folders are analyzed, but not deleted.' If set to 0, folders are deleted.'
'Const ForAppending = 8Dim Trimdays, sourcepath, returncode, debugtrimdays = 5sourcepath = 'c: winnt temp aquapd1500'debug = 0returncode = TrimFolders(trimdays, sourcepath, debug)' Trim Folders'Function TrimFolders (Days, Source, debug)' Description: Function to trim all folders in a path that are older than' a specified number of days, based on the current date and the folder' creation date.' ' Parameters:' -' Days - Number of days to keep.' Source - Source path on the local machine' debug - if set to 1, only report, do not delete.' Dim objFSO, objFiles, objFolderDim SourcePath, IndividualFileDim ResultFile, ResultFileNameDim TrimDateDim DaysToKeepDim SubFolderPathDim DirCount' Set the number of days to keep. Hi currently we have the following script to delete pdf files and folders older than five days in windows.We need to convert this.vbsscript to shell script.We dont need mail and all.Any advice or any one has this script. ' This script is setup to delete pdf files and folders older than 5 days' trimdays - Number of days to keep.
Folders older than this number of days are deleted.' Sourcepath - local path on the server where this is run.' Debug - If set to 1, the folders are analyzed, but not deleted.' If set to 0, folders are deleted.' 'Const ForAppending = 8Dim Trimdays, sourcepath, returncode, debugtrimdays = 5sourcepath = 'c: winnt temp aquapd1500'debug = 0returncode = TrimFolders(trimdays, sourcepath, debug)' Trim Folders'Function TrimFolders (Days, Source, debug)' Description: Function to trim all folders in a path that are older than' a specified number of days, based on the current date and the folder' creation date.' ' Parameters:' -' Days - Number of days to keep.' Source - Source path on the local machine' debug - if set to 1, only report, do not delete.'
Dim objFSO, objFiles, objFolderDim SourcePath, IndividualFileDim ResultFile, ResultFileNameDim TrimDateDim DaysToKeepDim SubFolderPathDim DirCount' Set the number of days to keep. Hi Gurus actually i have configured a dr of my database at multiple locations.I am in windows 2008 so transferring archives through ftp.Now i want to set a deletion policy to delete archives on main database+ at all locations Also i m taking hot backups in folder datewise at a location.I want to set deletion policy for same. So archives are files at a location.How can i set at OS to delete files older than 4 days. And hot backup is creating folders datewise.So how can i delete those folders which are 4 days previous.
Guys its something apart from database.Sorry to ask here.But if anyone has the idea of deleting files in windows automatically throgh script please share. User11221081 wrote: Hi Gurus actually i have configured a dr of my database at multiple locations.I am in windows 2008 so transferring archives through ftp.FTP????
Are you not using Data Guard? Which uses sqlnet to transfer the archivelogs as they are created. Now i want to set a deletion policy to delete archives on main database+ at all locations Also i m taking hot backups in folder datewise at a location.I want to set deletion policy for same. So archives are files at a location.How can i set at OS to delete files older than 4 days.If you delete archives from the OS, oracle will not know they are gone.
And hot backup is creating folders datewise.So how can i delete those folders which are 4 days previous. Guys its something apart from database.Sorry to ask here.What do you mean 'its something apart from database'?
But if anyone has the idea of deleting files in windows automatically throgh script please shareI think you need to explain your setup in more detail. It sounds like you are NOT using DataGuard for your DR, and it sounds like you are not using rman for your backups. Edited by: EdStevens on Aug 28, 2012 6:47 AM. While forfiles is an excellent utility, I found that it is missing an important condition. It does not seem to handle list files for an exact DATE. Perhaps it could use a parameter modifier. Like - perhaps an =.
I will use a modified version of this script to give me files modified on an exact date. Your issue has nothing to do with this thread or with scripting.
You need to post in a user forum like: ForFiles is not a script it is a utility program. I am new to VB Scripting and am just learning a lot of the proper scripting. However, I am in need of a vbs that will go out delete user folders (the local ones in C: users)from when they login and any other folders underneath that users folder. The trick is I need only the users that are 30 days or older to be deleted. So as an example, I have 10 users in the C: user folder 3 of them have not logged in in over 30 days on this particular computer. I need those 3 users deleted to make spare room on the local machine.
If anyone can point me in the correct direction it would be greatly appreciated. Hi, For a workaround, you may check themodified date ofprofiles' folder. If they are modified more than 30 days.
You can use the command in the following link to delete users account. Then delete their profiles. Regarding how to compose a script, please post the thread at help. Thanks for understanding.Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. I think I have written a WSH VBScript application that does what you want and can be downloaded via the linked to page with an example usages.
I use this scripts to delete and/or Archive files to a compressed drive. It is designed to run WSH XML from a BAT file using the windows scheduler. Inside each bat file are Delete and/or Archive Jobs that you want to run on servers to keep them clean of files left behind by users or misbehaving application. Logs are created for each file that was deleted or moved to the archive location. I created this archiving feature because most of the files that are being deleted not mine so I mail out the delete logs for final approval. A job is also run on the Archive location so files are automatically deleted after 90 days.
This should give the users enough time to let you know it they would like a file restored Examples of variables that can be defined via the WSH jobs are. Name of the files using regular expressions, Age of the file in days, folder to be searched, and log file to create. Please forgive me as the salesman in me comes out here.:) If it Scripts save you time/effort or eliminates the need to purchase more drive space. Please feel free to donate an amount you feel comfortable with:) as always suggestion for improvements are always welcome John. Some inbox folders aren't cleaned up of older files. We have this script running as a weekly advert against our primary sites to do cleanup of files older than 7 days where appropriate: 'Clean up inboxes 'Written 7/20/10, Sherry Kissinger '- On Error Resume Next Set fso = CreateObject(Scripting.FileSystemObject) Set sho = CreateObject(Wscript.Shell) '- 'Steps: '1) Determine Inbox location (using DDM as the representative) '2) For offersum, delete all files (not folders, files) inside '3) For each remaining folder location, determine date of any file inside.
I am looking for a script which would echo out the filenames from folders and subfolders and generate a output stating the filenames, which are picked up to delete X days old. I wanted to write this script in two different levels Level1: Script to echo filenames and give me the output of the filenames, which have been identified to be deleted.
This should include the names of the files in folders and subfolders (X days old) Level2: Combine the level1 script by adding a delete functionality, which would delete the files in folders and subfolders. I have a PowerShell file move script and a direct script to delete but I want to ensure the correct files are picked and I want to know the file names which are being deleted. I tried checking many forums and nothing i could get which satisfies my requirement. Can someone help me further.
How To Print A List Of Files In A Folder
Level1: Script to echo filenames and give me the output of the filenames, which have been identified to be deleted. This should include the names of the files in folders and subfolders (X days old) Level2: Combine the level1 script by adding a delete functionality, which would delete the files in folders and subfolders. It's the same answer as in your first thread: Look at the documentation to see what switch to use for Level and for Level 2::::: Logging Options::: /L:: List only - don't copy, timestamp or delete any files. I'm looking for a script that will delete files and subfolders older than X days, BUT only to delete subfolders more than 2 layers deep. We have a scanning folder, each department has a subfolder within the scanning folder, then there are files and subfolders within those department subfolders that should be deleted.
So the structure looks like this: Scanning Dept 1 Scanning Dept 2 I've come up with 2 possible solutions: either to run a script against the top level scanning folder, and 'exclude' all the department folders from deletion, or to run a script against each department folder in turn to delete the files and subfolders. Both of these solutions are a bit messy, and would require manual intervention if there is any change to the department folders. I don't have the scripting knowledge to work out another way of doing it, so I'm hoping someone here can help.
Listing files in a worksheet, printing all the files to PDF, or making changes to every file in a folder, there are many reasons why we may want to loop through each file in a folder. The macros below cover two scenarios. Looping through all files in a folder. Looping through all files in a folder and it’s subfolders Looping through all the files in a folder Of the two Macros in this post, this is the easiest to understand. This example will only print the file name to the immediate window.
But it is possible to change the code to make it significantly more complex. Check out the other to see what else could be achieved. 'Loop through all files in a folder Dim fileName As Variant fileName = Dir('C: Users marks Documents ') While fileName ' 'Insert the actions to be performed on each file 'This example will print the file name to the immediate window Debug.Print fileName 'Set the fileName to the next file fileName = Dir Wend The code above can easily be adapted with the use of wildcard characters.
Print All Files In A Folder
For example: 'Loop through each file with an extension of '.xlsx' fileName = Dir('C: Users marks Documents.xlsx') 'Loop through each file containing the word 'January' in the filename fileName = Dir('C: Users marks Documents.January.' ) 'Loop through each text file in a folder fileName = Dir('C: Users marks Documents.txt') Looping through all the files subfolders This Macro is significantly more complex.
To ensure the code works with any number of subfolders, the macro will actually call itself. This example will print the full file path (folder path and file name) to the immediate window. Sub loopAllSubFolderSelectStartDirector 'Another Macro must call LoopAllSubFolders Macro to start to procedure Call LoopAllSubFolders('C: Users marks Documents ') End Sub 'List all files in sub folders Sub LoopAllSubFolders( ByVal folderPath As String) Dim fileName As String Dim fullFilePath As String Dim numFolders As Long Dim folders As String Dim i As Long If Right(folderPath, 1) ' ' Then folderPath = folderPath & ' ' fileName = Dir(folderPath & '.' , vbDirectory) While Len(fileName) 0 If Left(fileName, 1) '.' Then fullFilePath = folderPath & fileName If (GetAttr(fullFilePath) And vbDirectory) = vbDirectory Then ReDim Preserve folders(0 To numFolders) As String folders(numFolders) = fullFilePath numFolders = numFolders + 1 Else 'Insert the actions to be performed on each file 'This example will print the full file path to the immediate window Debug.Print folderPath & fileName End If End If fileName = Dir Wend For i = 0 To numFolders - 1 LoopAllSubFolders folders(i) Next i End Sub.