Batch file user input for file name

February 23, 2009 at 13:23:34
Specs: Windows Vista
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.

Thank you

See More: Batch file user input for file name

Report •

February 23, 2009 at 21:12:45
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
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)

copy %filename%.pst "c:\Outlook default location"

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)


Report •

March 5, 2009 at 14:31:17
Thank you. I will try it out. Sorry I got very busy.

Report •

Related Solutions

Ask Question