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?

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

SET /p FN=Enter Flex Name:
Echo You Entered - %FN%

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

SET /p DATE=Enter Date(mm-dd-yyyy):
Echo You Entered - %DATE%
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


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%

Join our community to see this answer!
Unlock 1 Answer and 7 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros