guy4graphics
asked on
Batch file addressing help
Here is the scenario:
I have a batch file sitting in the folder 704011007-2695673140 . This is on a server being accessed through a mapped drive setup. So the drive on the server is E which is Z as the mapped drive on the computer I am using. I thought I would mention this in case this could cause problems.
The following is in the batch file...
md "\\e$\WorkQueue Inet\704011007-2695673140"
copy "e:\images\2. Pot O Gold Tournament\Kalamazoo Kings\14 YR\GAME 9\8353-DCM-200-2efv9919.jp g" "\\e$\WorkQueue Inet\704011007-2695673140\ 5x7 Print-8353-DCM-200-2efv991 9.jpg"
Questions:
- does the md... cause issues when the folder already exists.
- if i need to clarify anything please ask
THANKS!
I have a batch file sitting in the folder 704011007-2695673140 . This is on a server being accessed through a mapped drive setup. So the drive on the server is E which is Z as the mapped drive on the computer I am using. I thought I would mention this in case this could cause problems.
The following is in the batch file...
md "\\e$\WorkQueue Inet\704011007-2695673140"
copy "e:\images\2. Pot O Gold Tournament\Kalamazoo Kings\14 YR\GAME 9\8353-DCM-200-2efv9919.jp
Questions:
- does the md... cause issues when the folder already exists.
- if i need to clarify anything please ask
THANKS!
"does the md... cause issues when the folder already exists." - no, but you can set it to only process if it doesn't using:
set folder="\\e$\WorkQueue Inet\704011007-2695673140"
if not exist %folder% then md %folder%
set folder="\\e$\WorkQueue Inet\704011007-2695673140"
if not exist %folder% then md %folder%
e$ is the 'share' - you really need the full path of the server...
Something like
Set folder=\\servername\e$\Wor kQueue Inet\704011007-2695673140
if not exist "%folder%" md "%folder%"
copy "e:\images\2. Pot O Gold Tournament\Kalamazoo Kings\14 YR\GAME 9\8353-DCM-200-2efv9919.jp g" "%folder%\5x7 Print-8353-DCM-200-2efv991 9.jpg"
Something like
Set folder=\\servername\e$\Wor
if not exist "%folder%" md "%folder%"
copy "e:\images\2. Pot O Gold Tournament\Kalamazoo Kings\14 YR\GAME 9\8353-DCM-200-2efv9919.jp
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
well alright then...
Thanks for the answer/points... sorry sirbounty!
ASKER