Best way to use the path command for every session?


  1. Posts : 234
    Windows 10
       #1

    Best way to use the path command for every session?


    The net of this is, shades of 1980s DOS, I'd like to have a PATH established for every Windows session, using the DOS PATH command.

    35 years ago, I'd place the command in my c:\autoexec.bat file - but how do I achieve that today?

    Here's the exact scenario:

    I am using the jhead exe file - Exif Jpeg header manipulation tool - because I can't find anything else better and simpler to set the file date/time stamp for jpg files, to reflect the photo's exif data. This is a command line file, and I'd like to just be able to run it from anywhere, without prepending the path name when invoking jhead.

    So in general, wondering the best way to do this, specifically:
    1. How do I establish a dos path setting/command every time I start Windows?
    2. Where is a good place to keep my jhead.exe file, since it's not a true Windows file, but rather a DOS command line one? Does Windows have a dedicated folder for such relics?
      My Computer


  2. Posts : 14,005
    Win10 Pro and Home, Win11 Pro and Home, Win7, Linux Mint
       #2

    I'd do one of two things, one would be to use Notepad to create the same information that was used with DOS, call it a .bat file when closing instead of a .txt file. Save it into a folder, maybe create a new folder called Misc in C:. Then right-click that file and choose Send to, desktop as a shortcut. Then I'd right-click that on the desktop and Properties, change the icon and pick one. The other way would be to right-click the .exe file and do the Send to part the same way. Either choice usually allows right-click and Pin to Taskbar or Pin to Start, single click to open.
      My Computers


  3. Posts : 16,932
    Windows 10 Home x64 Version 22H2 Build 19045.4170
       #3

    asus2016 said:
    I am using the jhead exe file - Exif Jpeg header manipulation tool - because I can't find anything else better and simpler to set the file date/time stamp for jpg files, to reflect the photo's exif data.
    3 When I copy photos onto my computer, the Modified date is the same as it was on the camera/smartphone i.e. the Date taken.
    Is that not the same for you?
    [I am not referring to the Creation date you can also find in a file's properties. That is useless since it is set to the moment that you copied it to the computer.]


    asus2016 said:
    2 Where is a good place to keep my jhead.exe file, since it's not a true Windows file, but rather a DOS command line one? Does Windows have a dedicated folder for such relics?
    2 I would keep the utility within a folder that could not be changed by a non-Admin. I do the same - Set up my Tools folder ditty - TenForums
    - Since you are likely to add other utilities there over time, you might want to stick it in C:\Tools\External\JHead but it's up to you how you organise your subfolders.


    asus2016 said:
    1 How do I establish a dos path setting/command every time I start Windows?
    1 I really do not buy the huge leap from wanting to use this utility to wanting to alter the Path variable [Control panel, System, Advanced system settings, Advanced tab, Environmental variables] let alone wanting to alter Path at every boot.
    - You could just make a cmd.exe shortcut to the utility's location and use that every time. This shortcut would have to be made manually [right-click, New, Shortcut] with something like this in its Target field [just alter the path to suit]:-
    Code:
    cmd.exe /k "CD /d C:\Tools\External\JHead"
    - This shortcut will open a Command window at the utility's location
    Best way to use the path command for every session?-jhead-window.png
    - It will allow you to type in JHead commands without anything having been done to the Path variable at all.
    Best way to use the path command for every session?-jhead-window-help.png

    You can get even fancier if you want. This version of the shortcut sets a chosen Title for the window
    Code:
    cmd.exe /k "CD /D C:\Tools\External\JHead & Title JHead - Exif handler"
    Best way to use the path command for every session?-jhead-exif-handler.png


    Denis
    Last edited by Try3; 05 Jul 2021 at 09:49.
      My Computer


  4. Posts : 2,800
    Windows 7 Pro
       #4

    btw the version you provided is a Windows Console Application (It wont run on DOS). But If it is your Personal Computer. You can put a copy of jhead.exe in System32 and you will be able to run it from anywhere without modifying Path env.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:13.
Find Us




Windows 10 Forums