Little VB program that can delete a folder using the current date
Greetings,
I try to write a rudimentary program that will delete a file. I'll post some pseudocode to demonstrate what I intend to achieve:
If FileFolder is < 8=""> as CurrentDate
then delete
I looked at a few other Web sites and ran across something that seems possible to use. I will credit the site: http://www.vbforums.com/showthread.php?684680-RESOLVED-Delete-files-in-folder-that-are-older-than-a-certain-date
Private Sub Command1_Click()
Const FromFolder = "D:\seenu\from\" ' change the path
Const FilePattern = "* .log" "change the model
Dim file As String
File = Dir$ (FromFolder & FilePattern, vbNormal)
Len (File) > 0 do
If Date - FileDateTime (FromFolder & file) > 60 then
'Delete file '.
End If
File = Dir$)
Loop
End Sub
However, I'm not above trying to achieve, I don't know how tell the program to look at the date of the day of the machine and then determine anything more than 8 days before the current date should be deleted.
Once this program is completed and updated, I intend to have Task Scheduler running on a daily basis.
Sincere greetings,
TI banker
Hello
You can try asking the question in MSDN to support forums:
https://social.msdn.Microsoft.com/forums/vstudio/en-us/home?Forum=vbgeneral
I hope this helps.
Tags: Windows
Similar Questions
-
PowerShell script to delete files based on the current Date
I know using PowerShell Get-Date will look at the current date. I would like to make a very basic PS Script that will remove a file over 8 days based on the current date. According to me, with the help of a if/then the function will be necessary. I am very new to scripting if Im not sure how the syntax is written. Any help is appreciated.
This issue is beyond the scope of this site and must be placed on Technet or MSDN
-
I have a program I want uninstal - I tried several times via the control panel with prosses uninstal - nothing helps... Any help would be appreciated...
Hello
You can try this program to uninstall
Try the FREE revouninstaller
http://www.revouninstaller.com/revo_uninstaller_free_download.html
-
Can I user to set the current date in a text input area?
Is it possible that you can have the student enter as of today, using a text input area? Or what can I use if I want the student to do? I tried to put in the variable box jj/mm/aaaa and it does not work. Thank you
Hi Debbie,.
Yes I think that remove her tick to 'validate user input' would solve your problem.
/ Michael
-
DateField, can not be able to select the current date
Hai,
I use DateField in my application. Initially, the date field is showing-/-/---(JJ/MM/AAAA) this format. So if I click on this field to date I can't able to select the current date. If I go on any later date or past date and define it and that I can not choose the current date.
Hai,
Thax for your quick response...
I found this question in "Issue Tracker" here: https://www.blackberry.com/jira/browse/JAVAAPI-1163 -
Looking for an add-on that shows what programs are sending / reception of the internet - gives me control over what programs access the internet in real time.
Modules contained in Firefox; they have no access to the programs that run on your computer. The following modules can monitor your bandwidth usage in Firefox.
- https://addons.Mozilla.org/firefox/addon/DataFox/
- https://addons.Mozilla.org/firefox/addon/Minimeter/
All good software firewall allows you to control what programs connect you to the Internet.
If you need to see how much bandwidth programs run out, looking for a bandwidth monitoring tool.
-
Hello
I've recently updated to Windows Vista 64-bit for Windows 7 64 bit. After the upgrade, I noticed that Firefox is the only program that allows me to connect to the internet and surf the web. Windows updates not connecting not (error 80072EFD) and any other program that tries to connect to the internet fails. Also, when I install the updates to Firefox, Firefox is no longer will connect; I have to do a system restore to an hour before the updates of Firefox in order to get online. I searched the web relentlessly trying to identify the problem and tried the steps recommended on these sites: http://www.online-tech-tips.com/windows-7/windows-7-cannot-connect-to-internet/ and http://social.technet.microsoft.com/Forums/en/itprovistaie/thread/8777663d-013c-47b8-b11a-0e890612b533 and http://social.technet.microsoft.com/Forums/en-US/w7itprogeneral/thread/32593406-f0af-449d-9cfd-3be3827fbf30
Help, please!
Start with http://windows.microsoft.com/en-US/Windows7/why-can-t-i-connect-to-the-internet
You may encounter temporary connection [e.g. 0x80072EFD] errors when you use Windows Update or Microsoft Update to install updates
http://support.Microsoft.com/kb/836941For better assistance, post in this forum: http://social.answers.microsoft.com/Forums/en-US/w7network/threads ~ Robear Dyer (PA Bear) ~ MS MVP (that is to say, mail, security, Windows & Update Services) since 2002 ~ WARNING: MS MVPs represent or work for Microsoft
-
I can't install a program that can solve my problem with Firefox.
Windows 7 won't allow Firefox to install a program that can solve the problem. Whenever I click on the Firefox icon, the message says to allow a program to install. I click Yes, but it never gets installed.
original title: program firefox problemHello
1. are you able to install any other programs?
2. don't you make changes to the computer before the show?
3. What is the accurate and complete error message you get?Method 1
I suggest to perform the clean boot and then try to install Firefox. When you perform the clean boot make sure you disable all antivirus and firewall programs.How to configure Windows XP to start in a "clean boot" State
http://support.Microsoft.com/kb/310353
Note: Make sure that you reset the computer back to normal once the diagnosis is complete.Method 2
I suggest you try the steps from the following link:Problems installing and uninstalling programs on Windows computers
http://support.Microsoft.com/kb/2438651#reso3If the problem is only with the installation of Firefox, then I suggest you to contact Firefox support.
http://support.Mozilla.org/en-us/forums -
I need to address and mail about 100 letters y at - it a program that can help me do more effiently...
I need to address and mail about 100 letters y at - it a program that can help me do more effiently...
====================================================
If you have Microsoft Word, you can use the mail merge:Microsoft Word 2010 - use, fusion, and mail merge to create and print letters and other documentsMicrosoft Word 2010 - make labels for a mass mailing(294683) how to use mail merge to create form letters in WordMicrosoft Office Word 2002, 2003 - Word mail merge: a walk through the process -
whenever I click on a program, that it does not open and the 'open with' screen appears
whenever I click on a program, that it does not open and the 'open with' screen appears
Hello
Use above message for intense and thorough check for malware.
To restore the ability to run any .exe programs.
1 make a Restore Point so that you can come back if necessary back although probably not required.
How to create a Vista System Restore Point
http://www.Vistax64.com/tutorials/76332-system-restore-point-create.htmlHow to make a Vista system restore
http://www.Vistax64.com/tutorials/76905-System-Restore-how.html
2. copy BETWEEN these lines and paste it into Notepad - save as exefileFix.reg - then right
Click on it and FUSION - REBOOTDO NOT COPY THE LINES
-----------------------------------------------------------------Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\. [EXE]
@= "exefile".
"Content Type"="application/x-msdownload".[HKEY_CLASSES_ROOT\. EXE\PersistentHandler]
@= "{098f2470-bae0-11cd-b579-08002b30bfeb}".[HKEY_CLASSES_ROOT\exefile]
@= "Application".
"EditFlags" = hex: 38, 07, 00, 00
"FriendlyTypeName" = hex (2): 40, 00, 25, 00, 53, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 d, 00, 52,------.
00, 6f, 00, 6f, 00, 74, 00, 25, 00, 5 c, 00, 53, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 d, 00, 33, 00,------.
32,00, 5 c, 00, 73, 00, 68, 00, 65, 00, 6 c, 00, 6 c, 00, 33, 00, 32, 00, 2nd, 00, 64, 00, 6 c, 00, 6 c,
00, 2 c, 00, 2d, 00, 31, 00, 30, 00, 00, 31, 35, 00, 36, 00, 00, 00[HKEY_CLASSES_ROOT\exefile\DefaultIcon]
@="%1"[HKEY_CLASSES_ROOT\exefile\shell]
[HKEY_CLASSES_ROOT\exefile\shell\open]
"EditFlags" = hex: 00, 00, 00, 00[HKEY_CLASSES_ROOT\exefile\shell\open\command]
@="\"%1\" %*"
""IsolatedCommand"="\"%1\" %. "[HKEY_CLASSES_ROOT\exefile\shell\runas]
[HKEY_CLASSES_ROOT\exefile\shell\runas\command]
@="\"%1\" %*"
""IsolatedCommand"="\"%1\" %. "[HKEY_CLASSES_ROOT\exefile\shellex]
[HKEY_CLASSES_ROOT\exefile\shellex\DropHandler]
@= "{86C86720-42A0-1069-A2E8-08002B30309D}".[- HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.exe\UserChoice]
--------------------------------------------------------------
DO NOT COPY THE LINESIf necessary:
Check the fix of exe here
http://www.Winhelponline.com/articles/105/1/file-association-fixes-for-Windows-Vista.htmlAlso check this one if it applies
http://www.Winhelponline.com/articles/165/1/restore-the-exe-file-association-in-Windows-Vista-after-incorrectly-associating-it-with-another-application.htmlHow to set default Associations for a program under Vista
http://www.Vistax64.com/tutorials/83196-default-programs-program-default-associations.htmlI hope this helps.
-
currently still have PP CS5.5 & want to install on another office, understand that I can only use one at a time. don't have a CD, can I get information from the current installation and a link to download PP CS5.5?
Download & install instructions https://forums.adobe.com/thread/2003339 can help
-includes a link to access a page to download the Adobe programs if you do not have a disk or drive
Find your http://helpx.adobe.com/x-productkb/global/find-serial-number.html serial No.
-
How can I cancel a subscription. I am being charged monthly for a program that is not pop up on the tab plans and services. I don't remember if it's creative cloud or something else. I remember logging in the past months to cancel it, but I couldn't find the way.
Make sure that you are logged on the Adobe site, having cookies enabled, clearing your cookie cache. If he continues to not try to use a different browser.
-
For NetWeare customer service
How can I close the Client Services for Netware that is me project to use the fast user switching without losing my internet connectionHello
Your Windows XP question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in Forum.You IT Pro can follow the link for your question:
http://social.technet.Microsoft.com/forums/en/category/w7itpro
-
I have a monitor with a resolution of 1366 x 768, when I install the CC 2015 Adobe, adobe is the recommended resolution of 1440 x 900, y at - it all the parameters that can match their set so the display can look good?
Hey Boi,
Please refer to the system requirements | Adobe Creative Cloud
Hope that helps!
Kind regards
Sheena
-
Today I bought a new Mac that does ' t have a cd/dvd drive. I also bought Adobe photoshop elements 13. Is it possible that I can install this without using the provided disks? Help, please
http://www.Adobe.com/downloads/other-downloads.html can help
Maybe you are looking for
-
I had the wrong to import CD... new George Strait, Adele 25 come to mind. Both are on I-Tunes store, but when I import CD info is not removed
-
USB-TC01 gives error-201165 "firmware for this device is too recent.
Not sure where else to this post, but the USB-TC01 DAQmx uses, so maybe someone recognizes this. I plug it to the USB port and it lists very well. It runs the application very well canned. But when I try to take data under DAQmx 9.1.5 I get this cur
-
What is the status of Stop: c000021A (fatal system error) 0f 0x000004t.07 that it is a blue error screen that is displayed when the computer tries to boo
-
How can I correct - fatal execution error (0x7927f22e)
How can I correct - fatal execution error (0x7927f22e). I started having this popup after automatic update of Windows. Also get error message MsiExec message saying that no debugger is found. What happened and how do I fi? Thanks for help.
-
Display "0000000B internal error."
When you try to copy and paste on my windows xp system, I get this error message "internal error 0000000B" on my screen. I don't know what to do to fix this problem.