Lori Kaufman
Lori Kaufman
Writer
Lori Kaufman is a technology expert with 25 years of experience. She’s been a senior technical writer, worked as a programmer, and has even run her own multi-location business. Read more.
Notepad has been the standard text editor included in Windows for many years, allowing you to create and edit plain text files. But, did you know you can also use Notepad to keep a dated log or journal? It’s very easy and we’ll show you how.
Open Notepad and type .LOG in all caps on the first line of the new text file.
Select “Save As” from the “File” menu.
Navigate to the folder in which you want to save your log or journal file. Enter a name for the file in the “File name” box and click “Save”. You can give the file any name you want.
The time and date are not added to the file until you close and reopen the file, so click on the “X” button in the upper-right corner of the Notepad window to close it.
Reopen the text file you saved. The time and date are entered automatically, and the cursor is placed on the next line ready for you to start typing your log or journal entry. Save the file when you’re done and close Notepad.
The next time you open the file again, the time and date are added to the end of the file. Your file will start looking like the image at the beginning of this article. You can move or rename the file and the date and time will still be inserted every time you open the file.
- › How To Replace Notepad with Another Text Editor in Windows
- › Every Microsoft Windows Logo From 1985 to 2022
- › What’s New in Chrome 101, Arriving Today
- › Samsung T7 Shield Review: The Best Portable SSD, Now Rugged
- › The 5 Most Ridiculously Expensive Phones of All Time
- › Roborock Q5+ Review: A Solid Self-Emptying Robot Vacuum
- › What Does “Touch Grass” Mean?
Lori Kaufman
Lori Kaufman is a technology expert with 25 years of experience. She’s been a senior technical writer, worked as a programmer, and has even run her own multi-location business.
Read Full Bio »
There are Utorrent obviously some other code editors that are extensively used, for example Atom, but in this write-up, we are going to focus on Sublime Text and Notepad++. The software even offers standout features of other code editors without making a big fuss about and can be extended to pretty much anything you need. All of that for the price of nothing – how great is that?! No wonder so many of you requested to hear more about it. Note, however, that the plugin manager is currently not included in the 64-bit version of Notepad++. That’s because it is by a third party who are lacking behind in the development.
Unfortunately, Mac users find it unfair as there is no such application is available for them. According to the Notepad++ manual, the text editor can support around 80 programming languages. It is a cross-platform source code editor with the Python application programming interface. It is partly written in Python and C++ and it is available in all major operating systems including Windows, Mac and Linux.
- Here you can pick one of the standard fill and font colors or choose a custom combination.
- Personally, I use NP++ EVERYDAY. Missed the HTML preview feature from PSPad but fortunately I don’t use this feature often.
- After changing comparison colors, you must refresh any open comparison reports to see the updated colors.
- However, if there are no previous versions available, you have to resort to other professional software.
Unfortunately, it’s not as simple as just hitting the Delete key. Even if you’re logged on with an administrator account, you can’t just delete system files like Notepad. Fortunately, it’s still possible to take control of a file and delete it without resorting to nasty hacks like disabling UAC. There are a ton of great Notepad replacements out there. Notepad2and Metapad are both freeware favorites that work with the technique we’re describing in this article.
How To Run Notepad++ On Mac?
It is a smaller edition of the BBEdit IDE. TextWrangler comes with all the advanced features of the BBEdit IDE that one requires to develop codes. Some of the prominent features of TextWrangler include syntax highlighting, Shebang menu, auto-language prediction, and language modules creation. UltraEdit can be purchased through app bundles. This package assists users to compare files and folders and in development team arrangement. One of the exciting bundles to buy is UltraEdit and UltraCompare.
It’s like magic. Creating a .LOG file has never been easier. And all you need is Notepad on your Windows PC. After creating this LOG file, Notepad automatically inserts the current date and time after the last line. Check it out. If you’ve ever wondered about LOG file types, this Notepad trick is must.
Notepad is a very simple and easy to use text editor in Microsoft Windows. It is generally used to create simple text file (files which have .txt extension). It has very basic formatting tools such as font, font size, font style, finding and replacing text, cut, copy, paste and select all and save option. In Notepad you can save file with ANSI, UTF-8, Unicode, big-endian formats.
There are lots of notepad tricks that are available. Creating a LOG file by using Notepad is one of them. This is the step-by-step process to achieve a LOG file:
Step 1: Open Notepad (Start : Programs : Accessories)
Step 2: Type .LOG into Notepad (.LOG must be in capital letters and also at the very beginning / first line)
Step 3: Save this file by Save option in the File menu
Step 4: Close Notepad
Step 5: Open the saved file. Notepad automatically inserts current date and time after last line.
Step 6: You can type your data there for that time and date and save the file again.
Note : If you put a space before (.LOG) then this trick won’t work.
Whenever you open this file, Notepad automatically inserts system date and time after last line.
Want to master Microsoft Excel and take your work-from-home job prospects to the next level? Jump-start your career with our Premium A-to-Z Microsoft Excel Training Bundle from the new Gadget Hacks Shop and get lifetime access to more than 40 hours of Basic to Advanced instruction on functions, formula, tools, and more.
There are many excellent mobile and desktop apps for tracking to-dos, taking notes, and setting goals. Still, many of us prefer pen and paper. What the pen and paper approach lacks is convenient tagging, reminders, and search capabilities of digital tools. Combine the bullet journal paper method of note-taking with the digital powers of OneNote to enjoy the best of both worlds.
Instructions in this article apply to OneNote for Microsoft 365, OneNote 2019, OneNote 2016, and OneNote for Windows 10.
Bullet Journals
Bullter journals organize a paper notebook to capture and quickly find tasks, notes, events, and more so that you can stay structured and be more productive. OneNote is ideal for this note-taking method because it’s the closest to looking and acting like a physical notebook.
A few basics about the Bullet Journal system:
- On each page, you quickly jot down the information you’re trying to capture, which is called rapid logging.
- Pages can include tasks, notes, and events.
- For tasks, create a page of the current month’s events (for example, meetings or birthdays) and another page for the month’s to-dos. After those pages, create a daily calendar, moving your tasks from the month list to the current date.
- Use a check box to denote a task, a bullet for a regular note, an exclamation mark to note a great idea, an eye symbol for research, and a star to mark an item as a priority.
- Bullet journals have an index page at the beginning of the notebook where you mark the page numbers for different topics. You don’t need to create an index page in OneNote, as the program does the work for you.
Create a OneNote Bullet Journal
Applying the bullet journal discipline to OneNote requires a bit of setup.
Go to the View tab.
In the Page Setup group, select Paper Size.
In the Paper Size pane that opens on the left, select the Size drop-down menu, and choose A4.
Change the sizes in the Print Margins section if desired, then select Save current page as a template to make it the default paper size.
Enter a name for the template, select Set as default template for new pages in the current section, then choose Save.
Select to File > Print > Print Preview.
Select Scale content to paper width and choose Close.
After you set this template as the default for the section, create custom tags that match the shortcuts (or change the tags to whatever you prefer). Go to the Home tab.
In the Tags group, select the More arrow next to the Tags box.
Select Customize Tags at the bottom of the list.
Choose the tag you want to change and select Modify Tag.
Make any desired changes to the tag’s display name, symbol, font color, or highlight color, and then select OK. Repeat for any other customizations you wish to make.
Get the Most Out of Your Bullet Journal
With the template and the tags set up, you’re ready to use OneNote as an electronic journal. Here are a few suggestions for making the most of this tool.
Topics and Entries
Use short one-line entries with the recommended notation (the OneNote tags) to keep notes, events, and tasks effectively sorted. If you add general entries, don’t use the date as a title because OneNote does that automatically. This technique works great in tandem with the Onetastic OneCalendar add-in so that you can check each day’s notes with a minimum of clicks.
However, if it’s a specific topic, use the title space on the OneNote page. Labeling the page will help when you search for these entries. When it grows into a complex topic (for example, with many spreads or pages), consider creating a section with a different name.
Page Numbers and Sorting
Page numbers are mostly irrelevant if you use OneNote because it’s powerful search (Ctrl+E) does the sorting for you.
You can organize your pages by dragging pages in any order you like. You could group pages in subpages to avoid creating sections for topics somewhere between simple (one-page) and complex (one-section) ones.
Another useful feature is using OneNote’s internal hyperlinks. Right-click any entry and copy the link to it. Then, right-click and link (or press Ctrl+K) anywhere else and paste it.
Monthly, Weekly, and Daily Calendars
The best way to emulate a Bullet Journal monthly or daily calendar is to use the Onetastic OneCalendar tool. Combine it with the OneNote Tag Summary. To use the Tag Summary, go to the Home tab and, in the Tags group, select Find Tags. A Tags Summary pane appears.
Migration or Irrelevant
At the beginning of each month, check last month’s task entries, migrate tasks to the new month’s page, and mark those tasks as Migrated. This step keeps the previous month’s entries accounted for, so you know you didn’t leave anything behind. If any task is not relevant anymore, tag it so. This way, when you recheck past entries, you realize that these entries will not reappear in the future because the entries lost meaning.
To keep a sense of hierarchy, consider grouping sections into another OneNote notebook. Since OneNote searches through every open book, you won’t lose track of entries in different notebooks. Keep the main one (usually the default Personal Notebook) as your regular entry journal.
Go Further With OneNote
OneNote is a powerful tool. Pairing it with the Bullet Journal system is a smart way to organize your notes and schedule. One of the best parts of this system is combining OneNote with Outlook to get reminders for tasks and events.
It’s even better if you have a Windows tablet PC with a stylus as you can write in your OneNote notebook just like you would with a paper one—only with the advantages of search, tagging, syncing across devices, handwriting recognition, and similar benefits.
It is a very easy tutorial, yet very useful. You may need to create a log file or diary like thing, which will allow you to add date and time automatically.
We do not need any third party software, we will use the Notepad in Windows 7 to create such log file.
Open notepad, write ” .LOG ” (without the quotation marks), like this:
Save it with the name as you like:
Close it. Now, go to the location you have saved it (Desktop in our example) double click and open it:
The date and time will be added automatically, each time you open it. Do not forget to save it every time by pressing CTRL + S (Or click File > Save).
This Article Has Been Shared 627 Times!
About Abhishek Ghosh
Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter – @AbhishekCTRL.
Here’s what we’ve got for you which might like :
Articles Related to How to create a basic log file or diary with notepad
Hiding any drive in Windows 7 / Windows Vista machine is very easy and simple. Follow the following steps to hide any drive on Microsoft Windows 7 / Windows Vista without any software.
Although the copy of Windows 7 is completely legal and genuine,not cracked,hacked or pirated, it is possible that after an update,a notice says “This copy of Windows is not genuine”. Solve this problem in easy steps.
Tutorial on how to create a shortcut to run any specific software, program or application using keyboard shortcut in Microsoft Windows 7
With Windows 7 default application IExpress 2.0, you can create your own portable applications. Here is tutorial on how to create your own portable applications without using any third party extra software.
After following this tutorial, you will be able to change the default yellow colored folders that appears in left side of explorer pane in Windows 7.
Take The Conversation Further .
We’d love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!
If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.
Comments
generic cozaar says
Great post, I think I can actually use this.
I missed this article. Great tip that could come in very handy.
Thank you very much, it is a blog about log 🙂
Subscribe To Our Free Newsletter
Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.
Join a panel of BetterCloud customers for a conversation about how zero touch IT can improve employee experience at scale. Register Now
Journaling With OneNote
Throughout history, great figures like Benjamin Franklin, Winston Churchill, and Helen Keller each had a habit of journaling. Even today, business and thought leaders are advocates and practitioners of journaling, as the Harvard Business Review shares.
You understand that journaling is important, but sometimes it can be difficult to find the right tools and develop the right habits. Did you know OneNote is an ideal tool for journaling?
Unlike a physical journal, your OneNote journal can expand as large as you need. Hand written text, typed text, audio recordings, video recordings, drawings, and doodles can all be added to the journal with ease, making it a multimedia option that is far more robust than its paper counterpart. Plus, your journal in OneNote is available on the desktop, tablet, or phone: with or without internet.
Becoming one of those historic people that impact the world in revolutionary ways won’t happen overnight, if at all, but with processes like journaling, you can become the best version of yourself. This post suggests tips to help you get jump-started with journaling in OneNote. Use the comments section below to suggest any other tips you have to share with other readers.
Organizing a journal in OneNote
OneNote has an organization structure that mimics an actual three-ring binder. There are pages within sections, and sections within notebooks. My suggestion is to create a new notebook that will be your journaling notebook.
Within your journal notebook, there are two best practices:
1) Create a section for each year, or 2) create a section group of each year with a section for monthly entries and sections for general topics like finances, spiritual, and travel topics. This is the approach I take to journaling: a more categorical reflection.
If you decide to create a section for each year, it may look something like this:
As you can see, each month has its own page with a sub-page for each day. For the page of each month, it can be blank, with just the name of the month, or you can more details to your monthly journal.
If you decide to create a section group of each year with sections of journaling topics, it might look something like this:
To take advantage of the diverse amount of features you can add to your OneNote notebook, you could summarize the month with links to pages that have more details on events. Maybe you went on a vacation or made a career change. These things can be added neatly in a summary with links to the specific date of entry. If you like to re-read your journals, you will love this option.
There are many other additional features you can add to your notebook that involve multimedia. Maybe you will want to record a monthly three-minute reflection, or, a quick web camera video recording, reality TV style. These other forms of media might help you open up in different ways than through writing. Seeing or hearing your thoughts will give you even more insight into your historic moments, when and if you choose to reminisce in the future. Here’s a video to learn how to capture audio and video with OneNote.
Password protect sections
When I published a journaling post on my personal site, some readers commented and emailed me with concern about privacy. I can understand that. Your journal should be a safe place for your thoughts, hopes, and dreams.
Fortunately, any section in OneNote can be password protected. This will prevent any content in a section from being viewable, unless you have the correct password. Watch this video on how to password protect a section with OneNote 2013. The process is essentially the same in OneNote 2016.
Formatting your entries
Journals vary from blank pages to rigidly formatted questions and answers. Your personal preference will dictate which format you choose. Fortunately, there are a few OneNote tricks to help with any format you prefer.
If you prefer a blank page to jot down your thoughts, I have two quick tips.
Quick Tip #1:
Each day you journal, use the shortcut ALT + SHIFT + D (on a PC), which will enter the date formatted: 1/3/2016. Using ALT + SHIFT + F will even add the time of day in this format: 1/3/2016 7:42 AM.
Quick Tip #2:
Adjust your page view. Click on the top right arrow of your OneNote page to expand to full page view, without distractions. Or, on the View ribbon, select the Rule Lines command and make your page have lines, just like a notebook. This can be especially helpful if you prefer to write your notebook with a “pen and paper,” or in this case a stylus and OneNote.
For a more structured format, using templates can be extremely helpful. Templates allow a page format to be duplicated again and again. To create templates, check out this step-by-step tutorial.
Sometimes, deciding on what type of template to use can be challenging. For inspiration, see The Five Minute Journal, or peruse the planners and journals in your local book store. Create a template just for you, that helps you accomplish your goals.
The best journal is one that is used
I deeply believe OneNote is the best journaling tool out there, but maybe not all of you will. That’s okay. The best journal is the one that is used.
Last week I wrote about the importance of keeping a personal record in my article “Tell YOUR Story Too!” Today I’m sharing the way that I have set up my personal journal using Microsoft OneNote. Remember, there is no one right way to keep a journal. This is what works for me. Pick something that works for you and you will be much more likely to stick with it!
To set up a digital journal similar to what I use, navigate to OneNote and sign in using your Microsoft credentials. You can create an account if you don’t have one. If you plan on using a tablet or a smartphone, you will also want to download the OneNote app on your device. To access all the features OneNote has to offer, you can download the desktop app. I use the mobile app for my daily journaling most of the time, so I will demonstrate how to use the app first, with tips on the computer version at the end of the article.
The first step is to sign in to OneNote using your Microsoft User ID and password, or you can create login credentials if you don’t have them. Once you are signed in, create your first notebook. To make printing easier, I’ve decided to create a new notebook for every year, so I named mine 2020 Journal, but you can be as creative as you want with the name of your notebook.
Once your notebook is created, you will be able to add sections. Do this by tapping the + symbol at the top right of the screen, then highlighting the text “New Section 1” that appears and typing in the name of the section. Each section appears with a different-color tab on the left of the screen.
You can see that I have added each of the sections I wrote about in my article “Tell YOUR Story Too” to my journal:
Here’s a look inside my “Planning With Purpose” section.
You can add pages within a section by tapping the purple + icon on the bottom right of the screen. I start each year with a yearly planning page and include monthly and weekly planning pages. This helps me pace myself throughout the year and accomplish things a little at a time. You can indent page headings for a more organized look by tapping “Edit” in the top right corner, then selecting an entry and tapping the indent icon at the bottom of the screen. You can also rearrange entries by dragging using the three lines next to any entry. Tap “Done” at the top right when everything is arranged the way you want it.
I have created a template for my daily planning pages:
I keep a copy of the template at the bottom of my list of pages. I make a copy of the template each day and give it a heading at the end of the day based on what I think a standout item from the day is. I will use these headings to create a table of contents at the beginning of my journal before I print it next January. *Note: These images are from a mock journal I created for this article, so I don’t have entry headings – just dates.
Here is a screenshot of what all of this looks like on the web app on my computer. It is basically the same but your sections and pages show up on the same screen once you open your Journal Notebook. Add pages or sections by clicking the +Page or +Section tab in the appropriate column. Indent by right-clicking on an entry heading and selecting “Make Subpage.”
Finally, it is easy to print a page of your OneNote journal at any time! To print the entire journal with one click, download the desktop app where you can print right from OneNote or “Send” your entries to a word processing application if you want to do a little formatting. Don’t forget to create a table of contents and add it to your journal every year!
Other great features of OneNote that you can play around with:
Speech-to-text capability – You can speak your entries when you don’t feel like typing. I sometimes do this when using my phone because typing on a phone can get tedious.
The ability to add photos – This is a feature I want to use more often this year.
Adding audio to entries or links to websites – obviously this won’t translate over to your printed journal but can be fun within the digital version.
Sharing and Collaborating – You can share notebooks with others, which would be fun if you were working together on a family recipe book, preparing materials, memories, etc. for a family reunion, or anything else you want to collaborate with others on.
The more I use OneNote, the more I love it, and the more I find it is capable of, but I know it isn’t for everyone. I hope that you will find what works for you, because the most important thing is for you to keep your own record. Remember, you have a story, and your story matters!
A file with the LOG file extension is a Log Data file (sometimes called a logfile) used by all kinds of software and operating systems to keep track of something that has occurred, usually complete with an event detail, date, and time. It could really be used for anything that the application deems appropriate to write down.
For example, antivirus software might write information to a LOG file to describe the last scan results, like the files and folders that were scanned or skipped, and which files were marked as containing malicious code.
A file backup program could use a LOG file too, which could be opened later to review a previous backup job, read through any errors that were encountered, or see where the files were backed up to.
A much simpler purpose for some LOG files is to merely explain the newest features that were included in the most recent update of a piece of software. These are normally called release notes or changelogs.
How to Open a LOG File
The data contained in these files are usually regular text files. You can read a LOG file with any text editor, like Windows Notepad.
You might be able to open one in your web browser, too. Just drag it directly into the browser window, or use the Ctrl+O keyboard shortcut to open a dialog box to browse for the file.
How to Convert a LOG File
To change a logfile format into something like CSV, PDF, or an Excel format like XLSX, your best bet is to copy the data into a program that supports those file formats, and then save it as a new file.
For example, you could open it with a text editor and then copy all the text, paste it into a spreadsheet program like Excel or OpenOffice Calc, and then save the file to CSV or XLSX.
After you’ve saved it to the CSV format, use this online CSV to JSON converter.
What a LOG File Looks Like
This LOG file, created by EaseUS Todo Backup, is what most LOG files look like:
As you can see, there’s a message that the program wrote to the LOG file, and it includes the EXE file location and the exact time that each message was written.
Some might not be so nicely structured, though, and could be hard to read, like this one created by a video converter tool:
Others might even appear to be complete gibberish since there aren’t any timestamps. In cases like this one, the log is written to a file with the .LOG file extension but doesn’t adhere to the standard that most LOG files abide by:
More Information on LOG Files
You can build your own LOG file in Windows using the built-in Notepad application, and it doesn’t even need to have this file extension. Just type .LOG in the very first line and then save it as a regular TXT file.
Each time you open it, the current date and time will be appended to the end of the file. You can add text under each line so that when it’s closed, saved, and then reopened, the message remains and the next current date and time is available.
You can see how this simple example begins to look like the much fuller LOG files shown above:
With Command Prompt, you can also make a LOG file automatically through the command line while installing an MSI file.
Still Can’t Open It?
If you get a permissions error or are told that you can’t view the LOG file, chances are it’s either still being used by the program and won’t open until it’s released, or that it was created temporarily and has already been deleted since the time you tried opening it.
It might instead be the case that the LOG file is stored in a folder that you don’t have permissions to.
At this point, if your file still doesn’t open like you think it should, double-check that you’re reading the extension correctly. It should read “.LOG” but not .LOG1 or .LOG2.
Those latter two file extensions are associated with the Windows Registry as Hive Log files, and as such are stored in binary and unreadable with a text editor. They are located in the config subfolder of the System32 folder.
Elsewhere I have described how my current flow is based around a log (aka journal, aka diary) kept in time based order. That’s the part of my current system that works – capturing stuff. But I want to get better at tracking stuff, e.g. in GTD lists.
I have also posted questions about whether people have been able to use OneNote’s tags and FindTag feature to automatically extract lists that can be manipulated into GTD form – without too much hassle. (And I have mentioned occasional OneNote crasyes and file corruption.)
This post is more specific:
Q: how do you manage a time based LOG (diary or journal) in OneNote?
Currently, my OneNote LOG is a section in a notebook.
I create a new page for every new day, typically titled “** Monday Sept 24, 2018”.
Using the double asterisk to make the new day stand out in the list of pages in the section.
I then record some items in the “** page”. Sometimes inline, if short.
More often, as [[topic]], which is OneNote’s trick to create and link to a new page.
Longer notes in the new page.
Annoyingly, OneNote can get confused by multiple pages with the same name. So I often have to make the name unique, e.g. [[topic 9/24/2018]]
I may use sub-pages and sub-sub-pages. But, annoyingly, I cannot easily make all topics for a day sub-pages of the “**” LOG entry for that day – because OneNote only allows sub-pages, and sub-sub-pages.
This section can get very, very, long. Occasionally I take all of the older entries, and put them into a section called something like [[LOG older than 9/1/2018]]. Sometimes I may say [[LOG Aug-Sept 2018]], but that takes more work. Multiple such old LOGs into section groups, etc.
—++ Other things I have seen and tried
Some folks (like the OneTastic macros for OneNote) do things like putting multiple days on the same page. That doesn’t work for me, since I often need 10 to 100 pages per day.
Others go to the opposite extreme, creating a section per day, with section groups for weeks/months. I have tried that, but it seems to have to much clutter. I find looking through the page title list for the last week or so helpful.
Some create calendars with boxes fr each day, and list topics in each day’s box. Nice, but again I record too much.
—++ Stuff I have wondered about
Sometimes I wonder about giving up on time based, chronlogical order LOG / diary/journal
Creating pages randomly in GTD context lists (OneNote sections) or project sectuions.
And possibly faking out a tie based LOG by using a OneNote macro to extract page titles and dates, and sort by date.
A Registration file contains data from the Windows Registry
- Emporia State University
- Tweet
- Share
- Tweet
- Share
- File Types
- Apps
- Windows
- MS Office
- Linux
- Google Drive
- Backup & Utilities
- Design
- Cryptocurrency
What to Know
- REG files are text files: Create them within a text editor when you save a file with the .reg extension.
- On Windows, right-click a REG file and open it with Notepad, or the text editor of your choice, to edit it.
- To use a REG file, simply open it and its contents will be added to the Windows Registry.
A file with the .reg file extension is a Registration file used by the Windows Registry. These files can contain hives, keys, and values. These files can be created from scratch in a text editor or can be produced by the Windows Registry when backing up parts of it.
What REG Files Are Used For
There are two major ways to edit the Windows registry:
-
and then make registry changes manually.
- Use a REG file.
Think of a REG file as a set of instructions for changing the Windows Registry. Everything in it explains the changes that should be made to the current state of the registry.
In other words, and in general, any differences between the REG file being executed and the Windows Registry will result in an addition or removal of whatever keys and values are involved.
Example REG File
For example, here are the contents of a simple 3-line REG file that adds value to a specific key in the registry. In this case, the goal is to add the data necessary for the classic fake Blue Screen of Death:
Although neither the contents of a REG file nor the keys in the Windows Registry are case sensitive, some registry values are, so keep that in mind when authoring or editing them.
How to Import/Merge/Open REG Files
To “open” a REG file could mean opening it for editing or opening it to execute it. If you want to edit one, see the section above. If you want to execute the file (actually do what the file is written to do), keep reading.
Executing means to merge it with, or import it to, the Windows Registry. You literally combine the contents of the file with the other registry keys and values that already exist. Whether your intention is to use the file to add, delete, and/or change one or more keys or values, merging/importing is the only way to do it.
Always back up the Windows Registry before merging your custom-made or downloaded REG file with it. You can skip this step if you’re restoring a previous backup with this file but please don’t forget this important step in all other cases.
To merge/import it with the Windows Registry, just double-click or double-tap the file. This process is the same no matter the contents—a previously made backup you’re restoring, a registry tweak you authored, a downloaded “fix” for a problem, etc.
Depending on how your computer is set up, you may see a User Account Control message that you need to accept in order to import the file.
If you’re sure that the file you’ve chosen is safe to add to the registry, then select Yes on the prompt that follows to confirm that that’s what you want to do. Depending on the changes that the REG file made to the Windows Registry, you may need to restart your computer.
If you need more detailed help than the quick outline we have above, see How to Restore the Registry in Windows for a more thorough how-to. That piece is focused more on the restore-from-a-backup process but in reality, it’s the same procedure as merging a REG file.
By Rahul October 21, 2017 2 Mins Read Updated: August 25, 2021
This tutorial will help you to create files and directories with the name of the current date-time on the Windows system. For example, you are writing a script that creates backup regularly, Now you want to organize daily backups with the current date and time name, so it will be easier to identify, which folder containers backups of which date.
Let’s go through the tutorial and understand the process to accomplish this.
Get Date & Time in Batch Script
Windows takes the date in the format like Thu 11/02/2017. So use following commands to extract the date in YYYY format, month in MM format and date in DD format and stored in CUR_YYYY, CUR_MM, and CUR_DD variables correspondingly.
Next is to parse the time which is available in 15:41:36.39 (Hours, Minutes, Seconds, and Micro Seconds) format. Now extract the hours, minutes, seconds, and microseconds and store them in variables.
Now, you have variables having current date and time in variables. You can use and create any file name as per your requirements like:
If your current date time is Nov 02, 2017 15:41:36, then the above example will create a file in the current directory with name “access_20171102-154136.log”.
A Sample Batch Script with Date & Time
The complete windows batch script will look like below. To test this create a file test.bat with the following content. Save the file and execute the script.
Open a terminal and execute the above batch script.
You will find that a directory is created with the name “20171102-154136”. Also, a file created in the current directory with the name “access_20171102-154136.log” (Filename will be according to current date and time and will change during your testing)
Conclusion
In this tutorial, you have learned to create directories or filenames based on the current date time in the Windows system.
As a Data Scientist Programmer, you might have to build a project based on machine learning, deep learning, and other related projects. It’s easy to compile and see the output of a project are according to your requirement. But what does the compiler doing (Debugging) we ignored that? At the developing phase, it does not matter much. But in the production phase, it’s very important to keep track of logs in a file while the program is running. Otherwise, you will not be able to know which modules or lines of code have got errors and problems. This leads to high time consuming to fix the errors if the program crashes. In this post, you will know how to use logging in python to keep records of the occurred events within a program.
Before coding the custom logging lets understand the basic logging
Basic Logging in Python
For the logging, you use the logging module that is already available in the python standard library. You can import using the import logging statement. In python logging, there are 5 ways you can record the log messages. These are :
- logging.debug()
- logging.error()
- logging.info()
- logging.warning()
- logging.critical()
- logging.debug() : – Gives you the diagnostic information useful for debugging.
- logging.error(): – It tells you that certain operation cannot be performed due to some problem.
- logging.info(): – General information that contains the results of program execution.
- logging.warning(): It warns that there can be a future problem if you have not solved it.
- logging.critical() : – Serious error. The program cannot continue or run.
Coding the Basic Logging in Python
By default logging module only outputs the warning messages as the other levels are high from loggin.warning(). You can see I have written all the messages but in the output, I am not getting the info and debug messages. Without the Debug Level
You can set the minimum level in the logging.basicConfig() method to output all messages. Pass the level argument with the logging.DEBUG and you are able to see all the messages. The best practice is to create a separate log file inside for it. To do so you have to specify the filename parameter inside the basicConfig() method.
With the debug level
Log File Creation
Custom Logging in Python
The basic logging simply writes the message of the level to the log file. But you can also add some other things like function name, line number data, etc to know from where these messages are coming. For this, you will add the format and datefmt values inside the basicConfig() method. These are the group of formatted strings. You can look out all these on the official Python Logging tutorial. For example, I have added the following.
By default, the logging module takes other date and time format. The datefmt parameters take the format of the date and time you define. Like in this example I will take the following DateTime format.
Then I will define the datefmt as:
After defining all the required formats you will use inside the basicConfig() method.
Output of the Custom Log
Now Whenever you think that there can be issues in class, function or any lines of code. Then use these logging messages with all the above configuration. And when something happens inside the application, these log message will be written inside the log file. Doing this you can quickly find the problem and solve it easily. For example lets, I create a function that adds two integers. I will output the function name in the log file. Custom Logging of a Function
You can see the log file has added the debug message with the function name and the line number and other messages where the message has come. python logging
Conclusion
Creating a log file is a must for every data scientist or other programs in the production phase. It not only is the best practice but also the best way to solve the problems occurred in the application quickly. Whenever there is a problem just go the log file find the line number or function name and solve that problem. This tutorial is only the basic part of the logging. If you want to learn more about it then you can read the official Python Logging module.
Hope you have enjoyed the tutorial. If you want to know anything and have suggestions then you can contact us or message us on the data science learner official page for instant support.
- Total 2
Join our list
Subscribe to our mailing list and get interesting stuff and updates to your email inbox.
We respect your privacy and take protecting it seriously
Thank you for signup. A Confirmation Email has been sent to your Email Address.
When you create a database in SQL Server using the default options, one data file and one log file are created. The data file stores the data and database objects (such as tables, views, stored procedures, etc). The log file stores the information that is required to recover all transactions in the database. If you have a growing database, you may find yourself in the situation where you need to add a new log file (and/or data file).
Just as you can add more data files to an existing database in SQL Server, you can also add more log files. However, the syntax is slightly different depending on whether you’re creating a data file or a log file. Adding a data file requires ADD FILE while adding a log file requires ADD LOG FILE .
This article demonstrates how to use T-SQL to add a log file to an existing database in SQL Server.
Example
To add a log file to an existing database, use the ALTER DATABASE statement with the ADD LOG FILE argument. Supply the details of the new log file and run the statement.
Here’s an example:
This adds a log file with a logical name of Solutions_log_2 to the Solutions database. We specify that the physical path is /var/opt/mssql/data/Solutions_log2.ldf . Note that this path uses Linux/Mac syntax. If you use Windows you’ll need to use the applicable syntax (backslashes instead of the forward slashes).
Check the Result
You can check the result by running the following query:
We can see the new log file listed in addition to the original log file (as well as various data files).
Creating a book that has blank lines for readers to write on such as a journal or workbook? The instructions below will show you how to create note lines in Microsoft Word without using multiple underscores, which often do not format properly.
First find your book’s size and margins.
- Click on the Page Layout tab in Word.
- Click on the little drop down arrow to the right of the words “Page Setup” along the bottom of the menu.
- Write down your book’s width found under Page Size. For example: 6
- Write down both of your inner margins. For example: .50 and .50
- Write down the Gutter margin. For example .25
- Take your book’s width and subtract all of the margins.
- For example: 6 – .50 – .50 – .25 = 4.75
Next we will set up the formatting of the note line.
- Go back to your document.
- Find some open space and create a new paragraph line.
- Clear any formatting applied to this paragraph line by highlighting it then clicking on the Clear Formatting button in Word as shown below:
- Click on the Home tab.
- Click on the little drop down arrow to the right of the words “Paragraph” along the bottom of the menu.
- In the window that pops up click the Tabs… button at the bottom.
- Enter the number from above in the tab stop position box.
- For Alignment click on Right
- For Leader click on 4 ________
- Click on Set
- Click on OK
- Go back to your document.
- With your cursor in that paragraph hit the Tab key to create a note line.
Now we will save this as a new style.
- With your cursor still in that paragraph right click and choose ‘Save selection as a new Quick Style.’
- Name your new style, such as “Note Line”
- Click OK
To create the lines in the document set the paragraph line style to the Note Line style and hit the Tab key one.
Hit Enter and tab again to create the next line and so forth.
To make the lines further or closer together modify the style and adjust the Paragraph Line Spacing. To do that:
- Click on the Home tab.
- Click the little arrow to the right of ‘Styles’
- Click the drop down arrow next to the Note Line style
- Choose Modify
- Click on the Format… button in the window that pops up and Choose Paragraph
- Adjust the Paragraph Line Spacing and other options as you wish
- Click on OK
NOTE:
If you change the page size or margins of the book after setting up this style you will need to modify it to reflect the changes. Follow the directions above to recalculate the Tab settings based on the new measurements then Modify the style and change the tab settings to match.
Try the Book Design Wizard today and stop worrying about formatting problems and start focusing on creating a captivating book that looks great. Find out more…
In Python, there is no need for importing external library to read and write files. Python provides an inbuilt function for creating, writing, and reading files.
In this file handling in Python tutorial, we will learn:
How to Open a Text File in Python
To open a file, you need to use the built-in open function. The Python file open function returns a file object that contains methods and attributes to perform various operations for opening files in Python.
Syntax of Python open file function
- filename: gives name of the file that the file object has opened.
- mode: attribute of a file object tells you which mode a file was opened in.
More details of these modes are explained below
How to Create a Text File in Python
With Write to file Python, you can create a .text files (guru99.txt) by using the code, we have demonstrated here:
Step 1) Open the .txt file
- We declared the variable “f” to open a file named guru99.txt. Open takes 2 arguments, the file that we want to open and a string that represents the kinds of permission or operation we want to do on the file
- Here, we used “w” letter in our argument, which indicates Python write to file and it will create file in Python if it does not exist in library
- Plus sign indicates both read and write for Python create file operation.
Step 2) Enter data into the file
- We have a for loop that runs over a range of 10 numbers.
- Using the write function to enter data into the file.
- The output we want to iterate in the file is “this is line number”, which we declare with Python write file function and then percent d (displays integer)
- So basically we are putting in the line number that we are writing, then putting it in a carriage return and a new line character
Step 3) Close the file instance
- This will close the instance of the file guru99.txt stored
Here is the result after code execution for create text file in Python example:
When you click on your text file in our case “guru99.txt” it will look something like this
How to Append Text File in Python
You can also append/add a new text to the already existing file or a new file.
Step 1)
Once again if you could see a plus sign in the code, it indicates that it will create a new file if it does not exist. But in our case we already have the file, so we are not required to create a new file for Python append to file operation.
Step 2)
This will write data into the file in append mode.
You can see the output in “guru99.txt” file. The output of the code is that earlier file is appended with new data by Python append to file operation.
How to Read Files in Python
You can read a file in Python by calling .txt file in a “read mode”(r).
Step 1) Open the file in Read mode
Step 2) We use the mode function in the code to check that the file is in open mode. If yes, we proceed ahead
Step 3) Use f.read to read file data and store it in variable content for reading files in Python
Step 4) Print contents for Python read text file
Here is the output of the read file Python example:
How to Read a File line by line in Python
You can also read your .txt file line by line if your data is too big to read. readlines() code will segregate your data in easy to read mode.
Hello folks,
I have a batch script i use to backup files on the pcs in my network to a central NAS. Has an offsite tool too that runs fine but that is beside the point. What i have a problem with is that i have an xcopy line to backup files. And if it has an error i want the error to be displayed in the log file. But for some reason the redirect switch (>>pathtomyfile.txt) will not show that output nor give me the command that was used. I do not want my users to see the command but want to see it in the commandline. I hope everyone understands what im asking, anyway, here is a copy of what i am using and the scripts run on both winxp/windows vista machines.
TheOutcaste
OK, I’m assuming the redirection is on the command line that calls this script, as I don’t see it in the script itself. Which means all the echo commands like Logging into Server. etc go into the log file, is this correct? The only thing that will appear on the Command Prompt window are errors.
By default, the redirection only redirects STDOUT, not STDERR. You can redirect STDERR to a file as well, but not the same file to which the STDOUT is being sent.
And, you can’t output to both a file and the Command Prompt window at the same time, at least not natively. There are several apps to allow this though, search the web for windows tee command.
You can do it in a batch file, but you have to capture the error, read it back in, then output to the screen and then to the log file.
It is fairly simple to set up a separate file to capture errors. Use this:
backup.cmd 1>logfile.txt 2>errorlog.txt
Best to also echo a day/date line to each file at the start so you can match errors to the same run.
One problem with this is that anything that requires a user response is written to STDOUT — and since it is being redirected, you’ll never see it; for example, a prompt to overwrite an existing file. The program will appear to have hung. This shouldn’t happen with this file as you are creating a new folder to backup to each time. Same thing with Control C — you’ll never see the prompt asking if you want to terminate, but if you keep hitting CTRL+C it will stop
As far as outputting the command that caused the error, you would have to turn echo on. Even then, there would be no way to match the error to a specific command, as the commands would be echoed to the log file while the error goes to the error file.
I think the best approach would be to add error checking to the commands. Errors will be redirected to a temp file. After each command, check for errors, if an error occurs, you can read the error from the temp file and echo the error and the command to the screen, which will add it to the log as all output goes to the log.
When trying to open a large text file, do you face the “file is too big for Notepad” error on your Windows PC? Unfortunately, neither the Notepad application nor its improved version, Notepad++, is designed for such tasks. However, in this post, you’ll learn how to open a large file in Notepad and Notepad++. Also, we’ll take you through a list of other exciting text-reader applications that you can try.
What Is the Maximum File Size Notepad++ Can Open?
Notepad++ cannot support text files that are larger than 2GB, whereas Notepad, which is the older version, can only handle file sizes below 512MB.
The reason for this is Scintilla, which is the core component of Notepad++. According to the developers, it is responsible for several aspects of the app’s high-quality text display.
Also, Notepad++ will often require four times the memory space occupied by a text file to enable users to enjoy the advanced features. For example, the OS must allocate 8GB of RAM if the user wishes to open a text file of 2GB using Notepad++.
Consequently, sufficient RAM space is a critical factor for viewing files with the software.
However, in most cases, the OS will decline such demands, resulting in the “file too large” error message. Fortunately, there is a trick to get past that barrier and view big text files without installing other software.
How to Open a Large File in Notepad or Notepad++
Below are some simple tricks you can try. However, be reminded that RAM space plays an essential role in how your PC reads text files.
For optimum results, we suggest using a PC optimizer tool to clear out the clutter from your system’s memory. For that, we recommend Auslogics BoostSpeed. With a click, it will scan your system drives and get rid of junk and software leftovers.
Resolve PC Issues with Auslogics BoostSpeed
Besides cleaning and optimizing your PC, BoostSpeed protects privacy, diagnoses hardware issues, offers tips for boosting speed and provides 20+ tools to cover most PC maintenance and service needs.
1. Break the text file into smaller parts
If the file is above the 2GB threshold, use a site like Split CSV to divide it into portable chunks. Then, open them one after the other on Notepad++.
However, this approach may negatively affect your PC’s performance, resulting in delays.
To circumvent the issue, disable the following:
- plugins involved in scanning and analyzing text,
- syntax highlighting, and
- clickable links.
- Launch the Notepad++ application.
- On the right end of the screen, right-click on the Plugins tab and choose Plugins Admin.
- Then, under the Installed tab, checkmark each plugin.
- Lastly, use the Remove button to delete them.
- To stop syntax highlighting from slowing Notepad++, select the Language tab.
- Now, right-click the N option.
- From the pop-up menu, pick the Normal text configuration. After that, you can rest assured that syntax highlighting is disabled.
- To disable hyperlinks, go to the Preferences option under the Settings tab.
- On the left side, select the MISC tab.
- Finally, under the Clickable Links section, uncheck Enable.
2. Use a browser app
Opening a large text file via powerful browser software is another brilliant solution to the “file too big for Notepad” issue.
You don’t have to install anything. All you need to do is drag and drop the text onto the browser and let it load.
However, there are not too many browser apps with rich text viewing features, like auto-navigation, code folding, etc.
Apps You Can Use to Avoid the “File Too Large for Notepad” Error on Windows 10
1. Large Text Reader
This app allows you to read large text files of up to 10GB. Also, it has a simple interface that makes it easy to navigate.
However, it is a view-only application and is not suitable for text editing.
2. EditPad Lite
It’s another program that you can use to view big text files. But unlike Large Text Reader, it comes with an in-built text editor, so you can easily modify any data.
There are many other exciting features you’ll find in the EditPad Lite software. For example, the clipboard function makes it easy to access pasted content if you wish to make alterations. Also, with the search feature, you can quickly search for and edit any entry.
3. Universal Viewer
Aside from opening large text files, this app allows you to toggle between different modes: Binary, Hex, Text, and Unicode.
Though very simple to use, this tool is suitable for advanced users, such as those working in the data science industry.
4. Glogg
The software’s developer describes it as a multi-platform application for searching and browsing through complicated log files. That makes it suitable for programmers and system admins. Another outstanding feature of Glogg is its ability to open text files as large as 16GB.
Conclusion
If you are in the big data or machine learning industry, you might have encountered the “file too big for Notepad” problem while working with large text files. In this article, we’ve outlined different ways to fix the issue. If you find the solutions useful, we’d like to hear from you in the comments section below. Feel free to contact us if you need any assistance. You can also check our blog for other Windows 10 guides.
Through a daily work log, an employee can create a mental picture of what comprises his day and how he uses his time. It is also helpful in understanding how productive an employee is during a particular period of the workday.
For example, if an employee is more energetic and driven in the morning, he may work on his most significant tasks during this period and schedule his less demanding tasks during the afternoon such as responding to emails or returning calls.
When the employee is able to understand how he uses his time at work, he is also able to plan his day to make it more productive.
Daily work logs can also serve as a basis for determining non-core activities that use most of the employee’s time but does not help him reach his performance objectives and targets. If they can see how much time they spend on these activities, they should be able to do something to reduce if not to eliminate them altogether.
Aside from that, maintaining a daily work log is the first step towards developing a systematic way of handling tasks, thus ensuring an orderly work process.
Here are some ways on how to come up with a daily work log and how to use it to help improve the employee’s work:
- A daily work log should be a document which can be accessed easily and readily by the employee should he need to record his activity. The process of recording details should be straightforward.
- Aside from the daily activities, it should also contain information on important decisions made, unusual events such as work stoppage and emergencies, delivery of items, visitors, and other matters that the employee may deem relevant to look back on in the future.
- Keeping a daily work log should not only be for documentation purposes. The employee should also review it periodically to see how much he has accomplished in a given period, what tasks or projects are close to completion, and which ones need more of his attention and time. It can also motivate him to see that things are going just as planned and that he was able to accomplish all tasks. This will help him gauge his time management skills and increase his productivity.
- A plan for the next day may also go in the daily work log. As such, it serves two purposes—as a to-do list that the employee plans to accomplish and a work log after the task is complete.
Using a daily work log is a helpful productivity tool to track an employee’s activities and his accomplishments during the day. It also serves as a documentation of all important things to remember which he may otherwise forget. It also helps ensure that a pending task is seen and that the employee did not miss any assignments.
Daily Work Log: Free Download Section
You can also use the following templates on ProsperForms:
Additional Sources
- How to Write a Daily Work Report + Free Template Download
- How to Create a Successful Daily Huddle Agenda + Free Download
ProsperForms is a cloud solution to dramatically reduce the time you spend creating reports
- Make reporting easier with auto-fill: Fields such as date, name, report type, and formatting are inserted automatically by software.
- Consolidate reports automatically: Reports created by your team members can be consolidated easily.
- Save time with auto-layout: No need to spend hours in Word or Excel perfecting the report’s layout because it exports your updates into a beautifully crafted file with a couple of clicks.
- Peace of mind with auto-reminders: No one forgets to submit their reports because ProsperForms automatically sends timely reminders according to the schedule you chose.
- Decrease time and effort spent on monthly, quarterly, and yearly reporting thanks to powerful filtering and export features.
- Quick sharing: Reports can be either – exported to files and printed, or sent by email;– shared with the manager online (in real time);– optionally shared online as team-wide status reports, i.e., all team members share their progress with each other to spend less time on meetings.
How to configure reports on ProsperForms:
- Choose a form (100+ forms available) — customize our preset forms or easily create a new form in minutes.
- Setup reminders if you want your team members to receive automatic reminders when their reports are due.
- Configure who will submit reports by choosing the “Participants” tab.
Step 3 (Optional): Generate a report and export it to PDF. (Skip this step if you share status reports online and don’t print them.)
As laptops get smaller and lighter, you might be wondering if anyone still uses notebooks to take notes. Laptops might seem like a no brainer, but studies show that students who take notes by hand often learn more and perform better on exams than students who take notes using a laptop. Writing notes by hand also helps you memorize concepts better and maintain focus by decreasing distractions that are inherent in electronic note taking. To help maximize your learning the old-fashioned way, we offer notebook paper printable in various line color and paper sizes.
Template Contents
Below is a list of worksheets included in this printable notebook paper template.
US Letter
US Letter size paper (8.5” x 11.0”) with blue horizontal lines evenly spaced at .25 inches, a red vertical margin line, and white background.
US Letter BW
US Letter size paper (8.5” x 11.0”) with gray horizontal lines evenly spaced at .25 inches, a black vertical margin line, and white background.
Legal
Legal size paper (8.5” x 14.0”) with blue horizontal lines evenly spaced at .25 inches, a red vertical margin line, and white background.
Legal BW
Legal size paper (8.5” x 14.0”) with gray horizontal lines evenly spaced at .25 inches, a black vertical margin line, and white background.
A4
A4 size paper (8.3” x 11.7”) with blue horizontal lines evenly spaced at .25 inches, a red vertical margin line, and white background.
A4 BW
A4 size paper (8.3” x 11.7”) with gray horizontal lines evenly spaced at .25 inches, a black vertical margin line, and white background.
A Short History of Loose Leaf
Loose leaf paper is paper that is not bound in place by an adhesive. It is usually organized in a 3-ring binder or spiral notebook. You may consider printing the lined notebook paper provided in this template and punching holes in it. If so, you would be carrying on the tradition of loose leaf paper.
Legend has it that loose leaf paper was invented in 1913 by a man named Richard Prentice Ettinger. Richard worked as a law clerk when he decided to cut old law pages out of a bound book, as tax laws became outdated. He later replaced the pages with updated laws and drilled holes through the paper to organize the pages in a binder. That binder would be used over and over as new laws were passed. The loose leaf notebook was born!
Using Notebook Paper
Choose a Paper Size
Our free printable includes the two paper sizes most commonly used in the United States and many US territories – “US Letter” and “Legal.” US Letter size is the standard size found in schools throughout the country. Legal, the second most common size in the US, is most often found in professional offices and other businesses. A4 paper size is the standard paper size accepted world-wide (except most US territories). After you’ve made your paper size selection, print the notebook paper and put the blank pages in a binder or clipboard.
General Use
No matter which paper size you choose, all lined paper is evenly spaced at .25 inches, which makes it a “narrow ruled” notebook paper. A narrow ruled notebook will allow you to write more words per page by forcing you to write smaller letters inside the narrow spaces between lines. You can type words in the worksheets in Excel, but unless you are looking for a “retro” notebook paper to type on, these printable worksheets are best used as blank notebook paper to write on by hand.
Notebook paper can be used in a myriad of different ways. You can keep a record of important dates and track your to-do list. Brainstorm new ideas, sketch concepts, and draw graphs. Create a book, a bullet journal, a meal planner, a journal, a notepad. If you run out of ideas, here are 15 different ways to use a blank notebook.
Why the Line?
You may wonder why there is a vertical margin line 1 inch from the left side of the page. Think of this as an old-school way of indenting your writing, the same way you would set a left hand document margin in an electronic word processor like Microsoft Word or Google Docs. Further, if you intend to punch holes in your notebook paper, you would do so behind the margin line where there is usually nothing written. Lastly, the vertical margin line makes it easy to align your text.
Customize
Change Paper Size
If you require a paper size that is not included in the notebook paper template, you can easily change the paper size by visiting the “Page Setup” menu and selecting a new paper size.
Tip: See this tutorial on how to change paper size:
Note: If you change the paper size, some additional formatting, such as redefining print area, may be necessary.
Change Color Scheme
The white background and standard line color can be modified to fit your style. You can even add a holiday theme to your notebook paper, as shown below. Happy Halloween!
Tip: Insert icons using the “Insert” menu. See this recording on how to insert icons.
Listed here are some quick tutorials on how to make changes to color and style.
This tutorial will show you how to use a simple Windows Batch file and the task scheduler to create an automated daily backup. We will use the date variable to backup the files into folders with the first three letters of the day as the folder name.
First you will need to open notepad. The easiest way is going to start > run and typing notepad.
We will use notepad to create are batch file. A windows batch file is a set of instructions that tells the computer what to do. All we really need to do is add the command to copy the folder that we want to backup. I have a folder called ‘test’ that I want to backup to a folder called ‘backup on a network drive which I have mapped as the x drive. It only takes one simple command to do that actual backup. (note: there is no | in the command next the the word date, that is just the cursors)
Now I will explain the command “xcopy c:\test\* x:\backup\%date:
The xcopy commands will copy files and folders. The syntax for the command is xcopy [destination] [arguments]. Where source is the folder that you want to backup and destination is the backup on the network drive. The arguments tell xcopy how to handle certain situations. For my script I used /Y to suppress prompting when overwriting files. If you do not include this the script will ask you before copying each file, that wouldn’t be automated. /Q doesn’t display the file names while copying. /S copies directories and sub directories. You can find more arguments by opening the command windows and typing xcopy /?.
Where you see \%date:
0,3%\ is the name of the destination folder. If you didn’t want to change the name daily you could simple call it \backup\ or something like that. The %date% is a variable. If you type %date at the command line, you will get the current date and time output. The :
0,3 tells the command line to return the first three letters of that date (0-3) and trim off the rest.
Once you have made the changes that you nee, save the file as backup.bat
Now Open the Control Panel and select Scheduled Tasks
Now we want to add a new task so click the “Add Scheduled Task” button.
Click next and then browse. Locate the backup script you just saved and click open.
Select perform this action daily and then click the next button.
Select enter the time you want the task to run at in the start time box. Then make sure daily is selected and change the date to the day you would like this task to start running on.
Enter your password and click next. (note: if you do not have a password, you may have problems with the scheduled tasks running correctly. I recommend adding a password to your account, or setting up a separate account to run scripts.)
Click finish. Now we can test the backup script. Located the script in the scheduled tasks folder, Right click it and select run.
You should see the command window open. When the task is finished, browse to your backup folder and verify that the files have been copied.
This is a very basic idea of how to use the task scheduler and batch files to make backups.
Johnathan Ward is an experienced developer and consultant that writes tutorials to help other developers. In his day job, he is an IBM Watson Consultant with several years of experience deploying and customizing Watson Explorer solutions.
In Automation, reporting plays an important role so we can generate the different type of HTML reports, XSLT report, Log files etc.
If you want to create enhanced report and with log attached to HTML report you can use extent report (I use this report) as well
Here is the YouTube video for the same
What is Log File?
The log file is a just simple file, which keeps track of the record or event or info when any event happens or any software run. This whole process is known as logging. We can create a log file as simple log file as well as HTML format.
Note- Any file whose extension is .log will be considered.
Sample Log file
1- Simple log file in text format
log file in Selenium
2- Log files in HTML format
how to create log files in selenium
Why is it required in Selenium?
We can create a log file for our simple script also so we can track or debug our script easily if anything goes wrong in the script. For example, if our script is failing at some point then we can track back what went wrong.
What is log4J- Log4j is free open source tool given by Apache foundation for creating log files It helps us to generate a log file in various output target.
How to create log files in selenium
Step 1- Download log4j jar file
Click on the link to download http://mirrors.ibiblio.org/pub/mirrors/maven/log4j/jars/log4j-1.2.15.jar
Step 2- Add log4j to your current project
Select your project > Right click > Click on build path> Click Configure build path> Go to library section > Add external jar file > select the log4j > click on save
Step 3- Open notepad and copy the below code and save the file as log4j.properties.
Note- Please create the log folder inside home directory and while saving use “” to save file
Once you save file it will look like
how to create log files in selenium
Step 4- Write test case
Step 5- Execute your test case and verify the output and log files as well
Finally, here are three different log files.
how to create log files in selenium
Kindly Share this post with more friends and Spread the Knowledge
For any query join Selenium group- Selenium Group
Reader Interactions
Comments
Will the above steps in “How to create log files in selenium” will solve in linux machine ??
Yes, this will work in linux environment too.
Is it possible to catch test steps, results into log file without calling log in test steps
Yes, it is possible using Listeners. You can use either TestNG listeners or WebDriverEventListener or both as per your required granularity.
Hare Krishna says
I left the same comment under your video about how to generate log files. In case you see this first please help.
Mukesh, thank you a lot. I am learning like in a good school from you. Would you know how to add clickable line # in Intelije? I used the same and tried other log4j file content and I am getting this:
0 [main] INFO RandomPractice – Google is launched
17 [main] INFO RandomPractice – Search field is located
143 [main] INFO RandomPractice – Hare Krishna is entered
2126 [main] WARN RandomPractice – Searching for the entered text
Using Notepad
with Python Programs
Introduction
This web page explains how you can store several Python statements in one file to be executed in sequence by the Python interpreter. This document assumes that the Python software is already installed and running correctly. For instructions on how to download, install and run the Python interpreter program on single line Python commands you go to this page: Python_Installation.
In order to create multi-line Python programs, you must have a text editor. Notepad.exe is a simple text editor supplied with all versions of the Windows operating system. This document explains how to use Notepad.exe to create a simple Python program file, and then goes on to explain how to execute (run) the program using the Python interpreter.
Once you’ve mastered how to create simple Python programs using Notepad, and run them using the Python interpreter, you’re then ready to learn how to use a more sophisticated editor such as IDLE (supplied with the Python installation) and ConTEXT, designed for use with a number of programming languages including Python.
Both of these editors have a number of features to help you develop your Python programs including powerful syntax highlighting.
1. Create a folder for your program files
Please note: the screen shots shown are generated from a computer running the Windows 98 operating system. If you have another version of Windows the screens may look slightly different, but the procedures you should follow are the same.
First, you should create a folder (directory) on your local drive C: drive to save your Python programs. Go to the C:\temp folder and create a new folder named myprogs . If you’re unsure about how to do this, click on the Start button on the desktop taskbar , then click on Help .
For the purposes of this document, it’s assumed that the Python software is installed and a directory named myprogs exists in the temp directory of the C: drive:
C:\temp\myprogs
2. Start up the Notepad program
On your desktop, click on the Start button, then click on Programs , then Accessories , then select Notepad from the list of options.
You will then see a Notepad window with a blank page. Type in the text exactly as shown on the next screen.
2. Type in the program statements
3. Save the program file
To save the file, select Save As from the File menu on the Notepad menu bar. Locate your folder C:\temp\myprogs folder by clicking the down-arrow button to the right of the Save in: text box. Type in the program name prog1.py in the File name: text box, then click the Save button.
Note that Python programs typically have a name which ends with the extension .py , in this case prog1.py , but other extensions (e.g. .pyw on Windows) can be used.
3. Run the program
There are a number of ways to run the statements in a Python program file using the Python interpreter. Each of the following methods uses the file C:\temp\myprogs\prog1.py which contains these Python statements:
print “Hello World!”
print “Goodbye World!”
Running Python Programs – Method 1
On your desktop, click on the Start button, then click on Run .
In the Run window, enter the following text in the text box, then click on the OK button.
c:\python23\python.exe -i c:\temp\myprogs\prog1.py
The Python interpreter then runs the program statements contained in
c:\temp\myprogs\prog1.py
leaving the interpreter in interactive mode:
As explained earlier, to exit from the Python interpreter you must hold down the Ctrl keyboard key and press the Z key at the same time. (Operating systems other than Windows may require a different key sequence, e.g. Ctrl-C).
Running Python Programs – Method 2
In the second method of running a Python program, you type a command at the MSDOS shell command line. From the desktop, click on the Start button, then click on Programs , then MS-DOS Prompt . (In other versions of Windows, the MS-DOS prompt may have an alternative name, eg DOS Shell, Command shell, etc.)
Please note, other operating systems may default to a different folder than C:\WINDOWS. Notice that the prompt for MS-DOS is a single right arrow symbol >. The prompt for the Python interpreter is >>>.
Then type in the following text at the MS-DOS prompt, and press the Enter key to run the Python interpreter:
c:\python23\python.exe -i c:\temp\myprogs\prog1.py
The screen above shows the Python interpreter running in interactive mode. See Running Python – Method 1 for an explanation of interactive mode and instructions on the use of the Python interpreter with single Python commands.
As explained earlier, to exit from the Python interpreter you must hold down the Ctrl keyboard key and press the Z key at the same time. (Operating systems other than Windows may require a different key sequence, e.g. Ctrl-C).
If you run Python from an MS-DOS Prompt shell, exiting from Python returns you to the MS-DOS Prompt shell. To close the DOS shell and return to Windows, you must exit the MS-DOS Prompt environment by typing exit at the command prompt, then press the Enter key. An example of this is shown in the screen below.
Creating a new file in Linux is straightforward, but there are also some surprising and clever techniques.
In this tutorial learn how to to create a file from a Linux terminal.
- Access to a command line/terminal window (Ctrl–Alt–F2 or Ctrl–Alt–T)
- A user account with sudo privileges (optional for some files/directories)
Creating New Linux Files from Command Line
Linux is designed to create any file you specify, even if it doesn’t already exist. One smart feature is that you can create a file directly, without needing to open an application first.
Here are a few commands for creating a file directly from the command line.
Create a File with Touch Command
The easiest way to create a new file in Linux is by using the touch command.
In a terminal window, enter the following:
This creates a new empty file named test.txt. You can see it by entering:
The ls command lists the contents of the current directory. Since no other directory was specified, the touch command created the file in the current directory.
If there’s already a file with the name you chose, the touch command will update the timestamp.
Create a New File With the Redirect Operator
A redirection operator is a name for a character that changes the destination where the results are displayed.
Right angle bracket >
This symbol tells the system to output results into whatever you specify next. The target is usually a filename. You can use this symbol by itself to create a new file:
This creates a new empty file.
Use the ls command to list the contents of the current directory and find the file test2.txt.
Create File with cat Command
The cat command is short for concatenate. It can be used to output the contents of several files, one file, or even part of a file. If the file doesn’t exist, the Linux cat command will create it.
To create an empty file using cat , enter the following:
Note the redirection operator. Typically, the command displays the contents of test2.txt on the screen. The redirection operator > tells the system to place it in the test2.txt file.
Verify that the file was created:
The system should now have test.txt, test2.txt, and test3.txt in the list.
Create File with echo Command
The echo command will duplicate whatever you specify in the command, and put the copy into a file.
Enter the following:
Verify that the file was created:
You should see the test4.txt file added to the list. Use the cat command to display the contents of the new file:
The system should display Random sample text (or whatever you entered with the echo command.)
Create File with printf Command
The printf command works like the echo command, and it adds some formatting functionality. To add a single line of text, enter:
To add two lines of text, separate each line with the \n option:
You can use the cat command on either of these files to display their contents.
Note: To use several terminal instances in a single window manager, consider using Linux screen. It enables additional features and an enhanced command line for working with Linux files.
Using Text Editors to Create a Linux File
All Linux distributions have at least one text editor. Some have multiple editors. Each editor has different strengths and features. This will show you three of the most popular.
Vi Text Editor
Vi is the oldest text editor in Linux. It was created alongside the Linux operating system for directly editing text files. Since it’s unlikely you’ll see a Linux distribution without it, it’s a safe editor to know.
To create a file using Vi, enter the following:
Your screen will change. Now you’re in the text editor. Press the letter i to switch to insert mode, then type a few words to try it out.
To save and exit press Esc 😡 and hit Enter .
Vim Text Editor
You may have noticed that the Vi editor wasn’t very user-friendly. Vim is a newer version, which stands for Vi editor, Modified.
Use vim to create a new text file:
This screen will look similar to the Vi editor screen. Press i to insert text, and type a few words. Save file and exit by entering:
(Escape, colon wq, then Enter.)
Nano Text Editor
Nano is a newer and much easier text editor to navigate.
Create a new file by entering the command:
By default, Nano puts you directly into editing mode. It also displays a helpful list of commands at the bottom of the screen.
Enter some text, then press Ctrl+O to save the changes.
Press Ctrl+X to exit the editor.
Note: Learn all you need about Nano in the Install and Use Nano in Linux article.
Now you have several options to create new files in Linux from the command line. Next, learn how to copy files and directories in Linux to manage your files more efficiently.
Online Notepad is used to write and save your notes quickly without login or signup. Just write down your text and save it on your device.
What is Online Notepad?
Online Notepad is a text editor that makes it easier for anyone to write and save notes quickly. Usually, people use the inbuilt desktop applications of Windows or Mac. But it requires a PC or laptop to access it. What if we don’t have a PC or laptop? At that time, you can use our online notepad app. Even more, you can access it on any handy device through any browser. Also, you don’t need to log in or register to create or save your notes. And of course, it’s totally free. No need to pay a subscription charge to get access. Just open it, start writing, and save it.
The functions associated with our tool is amazing and very useful. Even more, we are more focused on building the best user-friendly interface. Therefore, we made this app very simple to use and operate. Any new user can easily go through the application.
Furthermore, data security is very important to us. Therefore, we assure you that, we don’t store any type of written data on our server. Your notes will be stored on your browser. So, you can come back and edit it anytime until you don’t clear the browser cookies.
Sometimes you need to create a file of specific size for testing purposes. While you can try to create just a text file with some app like Notepad, it is very inconvenient when you need to create a huge file or many files at once. Here is a better solution.
Windows comes with a special console tool, fsutil. Fsutil targets advanced users and system administrators. Some that I think may be of interest are discussed. It performs tasks that are related to file allocation table (FAT) and NTFS file systems, such as managing reparse points, managing sparse files, or dismounting a volume. If it is used without parameters, Fsutil displays a list of supported subcommands. The tool is available in Windows starting in Windows XP.
You must be logged on as an administrator or a member of the Administrators group to use Fsutil. It may be necessary to enable the WSL feature to get full fsutil functionality.
One of the fsutil parameters is “file”. It contains a set of subcommands which can be used to find a file by user name (if Disk Quotas are enabled), to query allocated ranges for a file, to set a file’s short name, to set a file’s valid data length, to set zero data for a file, to create a new file.
In our case, we need to use the fsutil app as follows.
To create a file of specific size in Windows 10, do the following.
- Open an elevated command prompt.
- Type or copy-paste the following command:
- Substitute the
portion with the actual file name. - Substitute
with the desired file size in BYTES.
The following command will create the file winaero.bin with size of 4 kilobytes under the location c:\data.
Tip: Do not forget to wrap around the path to your file with quotes if it contains spaces.
See the following articles to learn more on how you can use the fsutil app:
Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:
If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!
Author: Sergey Tkachenko
Sergey Tkachenko is a software developer from Russia who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube. View all posts by Sergey Tkachenko
3 thoughts on “Create a File of Specific Size in Windows 10”
“e following command will create the file winaero.bin with size of 4 bytes under the location c:\data.
fsutil file createnew c:\data\winaero.bin 4096”
That makes a file of 4 KILObytes :))
If you create such a file, will it overwrite data that was previously marked as deleted on the disk? Could this be used a way of preventing deleted files being recovered?