Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch file user input for file name
Name: Howkoss Date: February 23, 2009 at 13:23:34 Pacific OS: Windows Vista Subcategory: Batch
Comment:
Does this exist? 1- ask user for filename for .pst file. 2- Copy to users Outlook default location 3- Ask again. 4 Open these pst files in Outlook.
Name: stephenturns Date: February 23, 2009 at 21:12:45 Pacific
Reply:
Im not too sure exactly what your are after. This will prompt for the filename and copy it to a folder but will not open outlook:
@echo off :FILENAME set /p filename=What is the filename: set /p yn=Are you sure [y/n]? if "%yn%"=="" (echo Not entry) & (GOTO FILENAME) if /I "%yn%"=="n" (GOTO FILENAME) if /I "%yn%"=="y" (GOTO LOCATION) else (echo Entry not y or n!) & (GOTO FILENAME)
:END echo. set yn= set /p yn=Do this again [y/n]? if "%yn%"=="" (echo Not entry) & (GOTO END) if /I "%yn%"=="n" (GOTO QUIT) if /I "%yn%"=="y" (GOTO FILENAME) else (echo Entry not y or n!) & (GOTO END)
:QUIT EXIT
0
Response Number 2
Name: Howkoss Date: March 5, 2009 at 14:31:17 Pacific
Reply:
Thank you. I will try it out. Sorry I got very busy.
Summary: I don't know if you can do it directly using just cmd.exe's internal commands. For example, the SET /P command echoes the password back. Does anyone know of a way? In the meantime, here's a technique ...
Summary: You use /p if you want some input assigned to the variable. i.e user input set /p Name=What is your name?: echo Hello %Name% & pause file input set /p Variable=<Somefile.txt This would assign the s...
Summary: I have created a batch file that administrates and monitors a network. I have reached around 2500+ lines of script. But now i am going over the program making afew adjustments. When the user input hi...