Windows 10: Batch variable-text with distance to margin output?

Discus and support Batch variable-text with distance to margin output? in Windows 10 Network and Sharing to solve the problem; Hello Together i want to set a user-defined variable that will not display the text on the far left. if you set/p n= hello writes the text is... Discussion in 'Windows 10 Network and Sharing' started by Potterforever, Jun 27, 2020.

  1. Batch variable-text with distance to margin output?


    Hello Together

    i want to set a user-defined variable that will not display the text on the far left. if you

    set/p n= hello

    writes the text is still displayed on the far left

    :)
     
    Potterforever, Jun 27, 2020
    #1

  2. Batch file IF variable?

    Hi I am working on a small batch file on notepad

    and I got a bit confused when it came to the IF variable here is my current notepad file:

    (a small chunk)

    set/a sum=2015-%year%

    echo.

    echo By the end of 2015 I guess your age will be %sum% %fname%

    pause >nul

    @Echo off IF %sum%=(12<>20)

    echo (a teenager hey!)

    ELSE

    echo (Not in your teens are you?)

    pause >nul

    I know it is daft but its just a test file.

    the problem is the screen is exiting even though ive paused it and I'm a bit unsure about the variable IF

    any help will be useful hopefully.
     
    R PKotecha, Jun 27, 2020
    #2
  3. Try3 Win User
    Manipulating variables in batch files

    When you read other people's batch files, you will see variables used in ways that seem peculiar & unintelligible.
    - For Windows commands and batch files, variables are enclosed in % and sometimes %% [and you might sometimes even see %%%]
    - You might see, and this is just for example, Set MyVar=%MyVar:*cd=% This does actually mean something and can be very useful. It is one of the examples explained below.
    - Once you get the hang of manipulating variables in batch files you will be able to write very powerful procedures.
    - Once you get the hang of manipulating variables in batch files you will be able to adapt very easily to manipulating variables in better structured scripting such as powershell.

    This is a guide to manipulating batch files variables that I put together [based on a source whose identity I have rudely mislaid - it might have been RobvdW or an early version of Windows Batch Scripting - Wikibooks]
    - Downloadable version ManipulatingVariables-UsefulExamples.bat.txt
    - The file ManipulatingVariables-UsefulExamples.bat.txt is deliberately laid it out so it can be saved for reading as a text file [.txt] or for running as an innocuous batch file [.bat] - it is just a demonstrator, it displays variables onscreen but does not alter anything else at all. So it is safe to run. Just change its file extension for what you want on any given occasion [txt/bat] - no other changes are necessary.
    - It pauses after every example so you can examine each one in sequence.

    Code:

    Denis
     
  4. MCK
    mck Win User

    Batch variable-text with distance to margin output?

    System environment variable won't stick

    Running Win10 Home on an Acer Spin 3, 64bit, i7cpu. I try to add a path to the system environment variables by:

    1. Control Panel > System > Advanced system settings > Advanced tab > Environment variables

    2. The "Environment Variables" window opens.
    3. In the "System Variables" pane I select "Path" and click the EDIT button.
    4. A list of the current system paths is displayed.
    5. I click the NEW button, browse to the path I want to add which is "C:\Python36-32" and click OK. The path "C:\Python36-32" is added to the list of current system paths.
    6. I click OK and am returned to the "Environment Variables" window.
    7. I click the "X" at the top right to close the "Environment Variables" window.

    Now if I click the "Environment Variables" button again (end of step-1) and repeat steps 2-4, the new path I added in step-5 is gone. IOW, adding a new path won't stick.

    What am I doing wrong?
     
Thema:

Batch variable-text with distance to margin output?

Loading...
  1. Batch variable-text with distance to margin output? - Similar Threads - Batch variable text

  2. Batch file not setting variables to DATE & TIME text valuse

    in Windows 10 Software and Apps
    Batch file not setting variables to DATE & TIME text valuse: Running the following batch script displays "downsecs = 1, DownStrtDate = and DownStrtTime =" Why are the variables DownStrtDate and DownStrtTime not properly set to the current date and time SET /A downsecs = 0 SET DownStrtDate = %DATE% SET DownStrtTime = %TIME% SET /A...
  3. Margins

    in Windows 10 Customization
    Margins: The content page will not extend to the left margin and neither will the right and that, of course, is so important so I can scroll down the page. What can I do, Community? Thank you....
  4. Batch variables are not output?

    in Windows 10 Network and Sharing
    Batch variables are not output?: Hello everybody I have written the following script: @echo off setlocal enableDelayedExpansion :set/p again Z=Number of rows: set/p S=Number of columns: set/a Ze=%Z%+0 set/a Sp=%S%+0 if not %Z%==%Ze% ( cls echo error.. goto again) if %Z%==0 ( echo error... goto again )...
  5. With batch file output as internet page?

    in Windows 10 Customization
    With batch file output as internet page?: Some years ago someone showed me how to create a website with a batch file. This was just text, it had no function. Does anyone know how to do this or does anyone know the orders? Mit Batch-Datei Ausgabe als Intenetseite?
  6. Using variables with the rename command in a batch file

    in Windows 10 Network and Sharing
    Using variables with the rename command in a batch file: Hello, I am trying to use variables in renaming a robocopy log file but I continually receive a 'syntax error'. Everything works perfectly until I use the rename command. I am using the latest build of Windows 10. Any advice will be appreciated, thank you. The batch...
  7. BATch output to file Heeeelp!

    in Windows 10 Support
    BATch output to file Heeeelp!: Win10 - 64 bit Pro. Version 1909. fully up to date, but obviously with KB4524244 uninstalled. *Sad G'day folks. I have a Win .BAT file that I run every day to copy important data from the days doings from the C:\ VRPC to the D:\VRPC. Below is one command line from the BAT...
  8. Batch file paste text

    in Windows 10 Support
    Batch file paste text: Suppose I frequently want to enter "Mary had a little lamb." into a form or editor. Can this be done with a batch file? (Yes, I know about AutoHotkey.) 109978
  9. How to output day of week to variable in batch

    in Windows 10 Support
    How to output day of week to variable in batch: Hi all, I am trying to write a batch file in Windows 10 to output day of week (Monday, Tuesday etc) to variable do that I can do certain procedures on differnt days o the week and am having major problems. If I type DATE /T at command prompt I get 15/01/16 and no day of...
  10. Outputting Directories To Text

    in Windows 10 Support
    Outputting Directories To Text: i am trying to create a text file with a list of directories, but having troubles because i can't get as specific as i would like. Code: dir /s /b /ad /on > filename.txt[/quote] and some programs i have tried aren't getting what i want exactly 1. the root directory...