Source: Windows Central (Image credit: Source. Click the Clipboard page on the right side. We make de difference between the first marked time and second and write into the log. To enable Clipboard history through the Settings app, use these steps: Open Settings. We copy the file and mark the second time. We create the log file, note the starting copy time and initialize our first time. After the variable initialization we define what file we want to copy, where we want to copy the file and where the log will be created. To assign the current time and date to a file without modifying the file, use the following syntax: Copy. To copy files that are 0 bytes long, or to copy all of a directory's files and subdirectories, use the xcopy command. ObjFile.Write "File copied in: " & intHours & " hours " & intMinutes & " minutes and " & intSeconds & " seconds" & vbCrLf The copy command assumes the combined files are ASCII files unless you use the /b option. IntMinutes = (intTotalSecs Mod 3600) \ 60 ObjFile.Write "Copy file started at: " & Now() & vbCrLf Set objFile = filesys.CreateTextFile(outFile,True) OutFile=strCurrentDir & "\" & strUserName & "-Copy-LOG.log" '-Select file, copy location and log location. StrUserName = WshShell.ExpandEnvironmentStrings( "%USERNAME%" ) Set WshShell = CreateObject("WScript.Shell") StrCurrentDir = Left(Wscript.ScriptFullName, (InstrRev(Wscript.ScriptFullName, "\") -1)) Set filesys=CreateObject("Scripting.FileSystemObject") I am sure that there are many other ways you can test your intranet speed and collect logs after that, and decide if you can deploy your app for the whole infrastructure, or in waves of X machines so you don’t overload your network…but i am attaching the script anyway. 3 Set the Event Log size to a maximum of 64 MB. Windows command prompt log to a file Ask Question Asked 10 years, 10 months ago Modified 15 days ago Viewed 294k times 28 I'd like to easily save the log of the Windows command prompt into a file. I’m not sure how useful this script will be, but, a while ago somebody came to me and said “we need to test how much time it’s needed to copy a big file from a share over the network for the users, and please create logs so we can collect them and analyze them”.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |