Login Register






[Batch] Help w/ Wierd Spacing Issue filter_list
Author
Message
RE: [Batch] Help w/ Wierd Spacing Issue #15
You could also have files...

Code:
@echo off&setlocal enabledelayedexpansion call get_username.bat

In get_username.bat, you could have everything that would grab the user input. Then you can use it later.

Example:
main.bat:
Code:
@echo off&setlocal enabledelayedexpansion call functions1.bat echo %user%

functions1.bat:
Code:
set user=Bob

Output:
Code:
Bob

For a simple function:
Code:
@echo off&setlocal enabledelayedexpansion call :get_username echo %user% pause&goto :eof :get_username set /p user=Enter a username: goto :eof

The other way you could set it up is have a file that just holds related functions, and call functions from within the file externally.
(This post was last modified: 03-23-2014, 05:47 AM by 0xDEAD10CC.)

Reply





Messages In This Thread
[Batch] Help w/ Wierd Spacing Issue - by DarkMuse - 03-04-2014, 02:37 AM
RE: [Batch] Help w/ Wierd Spacing Issue - by 0xDEAD10CC - 03-23-2014, 05:32 AM