Avatar of Mike Minchinton
Mike Minchinton
Flag for United States of America

asked on 

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

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%


Open in new window

Scripting Languages

Avatar of undefined
Last Comment
Bill Prew

8/22/2022 - Mon