Saved Bookmarks
| 1. |
Solve : trouble creating a script to find ifa folder hasnt been modified in the last day? |
|
Answer» HI guys, i really need HELP, i'm trying to create a script that finds if a FOLDER hasnt been MODIFIED in the last day and create a txt file in a location. however if it has been modified in the last day i want it to quit the script. At the moment, i have only been able to create one (due to my basic knowledge of VBscripting) that finds if a folder exists and if so creates a script. this however, doesnt work as the subfolder is created daily with a new name and obviously this means my script would have to be changed daily which is pointless. can someone help me. i need to have the folder read and a txt created in another location if the last modified date isnt < 1 day. this is the script so far; Set objFSO = CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists("c:\test") Then wsscript.quit Else dim filesys, filetxt, getname, path Set filesys = CreateObject("Scripting.FileSystemObject") Set filetxt = filesys.CreateTextFile("c:\test\test.txt", True) path = filesys.GetAbsolutePathName("c:\test\test.txt") getname = filesys.GetFileName(path) filetxt.WriteLine("file doesnt exist.") filetxt.Close End If i look forward to hearing anything! thank you, DL |
|