How can I set the name of the ini file?

Posted on 2014-08-26
Last Modified: 2014-08-28
I would like to change the following:

 set IniFile=%~dpn0.ini

Where the n is supposed to be the name of the bat file, I want to specify the name of this ini file to be for example:
So the ini file I want to be specified as record.ini

Everything else can stay the same as is indicated in the script, the path, location etc.
Question by:100questions
    1 Comment
    LVL 43

    Accepted Solution

    Then just specify the name:

    Set IniFile=record.ini

    or if you want the path of the existing batch file too:

    Set IniFile=%~dp0\record.ini

    i.e. take the (d)rive and (p)ath of the batch file name and add the word \record.ini to the end.


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    VALIDATING DATES One method of validating dates is to jam the date into the DATE command and see if it accepts it by examining the system's errorlevel value. A non-zero result indicates failure. A typical example might look something like the fol…
    Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
    This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
    In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now