Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Need a script that will create its own directory to dump logs into

Avatar of Mike Minchinton
Mike MinchintonFlag for United States of America asked on
Scripting Languages
7 Comments1 Solution170 ViewsLast Modified:
So I have this script below, and when it goes and retrieves logs, I need it to actually create its own directory in a folder in the C: drive.   I have attached the script.

Anybody have any ideas on how I can make it create a directory each log dump?


SCRIPT:
Echo OFF
Echo "Copy Flex Terminal Log files.  Press Any Key If You Think You Can Handle It"

:NO
SET /p FN=Enter Flex Name:
Echo You Entered - %FN%
@ECHO OFF

:choice
set /P c=Is this correct Flex Name(Y/N)?
if /I "%c%" EQU "Y" goto :yes
if /I "%c%" EQU "N" goto :NO
goto :choice
Pause

:yes
SET /p DATE=Enter Date(mm-dd-yyyy):
Echo You Entered - %DATE%
:choice
set /P c=Is this correct date(Y/N)?
if /I "%c%" EQU "Y" goto :RUN
if /I "%c%" EQU "N" goto :YES
goto :choice
Pause

:RUN
net use \\%FN% PASSWORD /user:DOMAIN\USERNAME

xcopy "\\%FN%\c$\CGTDeviceManager\Logs" "C:\Users\USERNAME\Desktop\ZIPS" /D:%DATE%
xcopy "\\%FN%\c$\Program Files\Primeline Enterprise\Applications" "C:\Users\USERNAME\Desktop\ZIPS" /D:%DATE%
***xcopy "\\%FN%\c$\Users\ser-flexuser\AppData\Roaming\FlexTerminalClient\Local Store" "C:\Users\USERNAME\Desktop\ZIPS" /D:%DATE%***
xcopy "\\%FN%\c$\Documents and Settings\ser-flexuser\Application Data\FlexTerminalClient\Local Store" "C:\Users\USERNAME\Desktop\ZIPS" /D:%DATE%

Pause