How To Combine Multiple Text Files (.txt) Into One Big File

Recently, I have a specific need to combine multiple files into one big file. The task is very simple. However, if I do it manually (combine over 32,000 small text files into one), it may cost me a day, or even more.

How to combine multiple text files into one

So, I decided to make a tool in Java. Its interface is very simple but you can use it right away without much learning. Here is the app’s interface:

As you can see from the interface, there are three buttons and these are the one you need to pay attention to. To start combining  your small .txt files, click on the button “Select files to combine”. Here, I’m going to select all of my .txt file (over 32,000 files). For those of you who are curious, these are the books from project Gutenberg.

Now, click on Open.

Next, you need to select the destination file. This is the file that contains all the text from the small files.

You can see that the path to the destination file is displayed in the text field at the left of the select button.

Now, simply click on combine now. The program will go ahead and combine your files into one file. In my case, all over 32,000 files are combined into one and the destination file is over 250MB! That’s a lot for a .txt file. In fact, there are more than 7 million line of text inside that file.

If you are a Java developer,  you can check out the repo here on Github here to modify it to your needs. If you are an user, you can download the ready built app here to start combining your .txt files:

Click here to download the executable app.

How To Set Sale Price For Woocomerce Products

WooCommerce has made selling on WordPress super easy. You can add a product and sell it in just a few minutes. As a common matter of stores, we have sale events. So, how do you set the sale price for your products? Let’s find out.

The quickest way to set sale price for your product (or to change the sale price if you have already set it) is to go to Products->All products on your dashboard menu. There, you can see the list of all your products. Now, hover your cursor over the product you want to edit the sale price:

Now, click on Quick Edit. You will see the quick edit screen appears:

As you can see, there is a box for your to enter the sale price. If you set a sale price, make sure you also set the regular price and the regular price must be greater than the sale price (it’s obvious, isn’t it).

Finally, click on the update button and you are done. Your customers now will see that your product has a sale offer. Hopefully, your sales will skyrocket soon!

 

How To Disable A Shipping Method In Woocommerce

WooCommerce comes with a few shipping methods and with plugins, you can add more. So, you can have literally unlimited shipping options.  Having multiple shipping methods seems to be a good thing since it gives the customers more options. However, if you know that your customers will use only a certain shipping methods, having more than that can cause confusion.  In this post, we are going to find out how to disable a shipping method in Woocommerce so your customers will have only the methods that suit them.

How To Disable A Shipping Method In Woocommerce

First, go to Woocommerce->Settings and click on Shipping.

woocommerce shipping screen

In the first screen, you can see the list of shipping zones. If you don’t know what shipping zones are, they are the area you can define to apply different shipping policies. This is a very nice option of WooCommerce. For example, you want to apply free shipping in Asia and a flat rate $10 in Europe, you can add two zones Asia and Europe and apply the appropriate shipping methods to those zones.

Now, one zone can have multiple shipping method. For example, my customers in Asia will see this when they checkout:

Pretty confusing, right? Now, I would like to remove the Free shipping option, here is what I’ll do:

  1. Click on the shipping zone I want to modify its shipping methods, in my case, I will click on Asia.

As you can see, all the options are listed in the next screen. To disable any shipping method, simply click on the toggle button to turn it off. Here, I’m going to turn off free shipping. Don’t forget to click on Save changes.

If I go and check the checkout page now, the Free shipping method is no longer available:

That’s it! Now you know how to enable and disable a shipping method for a particular zone in Woocommerce. Thanks for reading and if you have any comments, please leave it below.