[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Batch file addressing help

Posted on 2007-04-09
6
Medium Priority
?
187 Views
Last Modified: 2010-04-16
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.jpg" "\\e$\WorkQueue Inet\704011007-2695673140\5x7 Print-8353-DCM-200-2efv9919.jpg"

Questions:
- does the md... cause issues when the folder already exists.
- if i need to clarify anything please ask

THANKS!

0
Comment
Question by:guy4graphics
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 1

Author Comment

by:guy4graphics
ID: 18880227
Also, is are the paths addressed properly?
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18880229
"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%
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18880232
e$ is the 'share' - you really need the full path of the server...
Something like

Set folder=\\servername\e$\WorkQueue 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.jpg" "%folder%\5x7 Print-8353-DCM-200-2efv9919.jpg"

0
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 
LVL 43

Accepted Solution

by:
Steve Knight earned 2000 total points
ID: 18880555
or...

as you are running it from Z: drive mapped to that folder already then you could use z:

"I have a batch file sitting in the folder 704011007-2695673140"
md "\\e$\WorkQueue Inet\704011007-2695673140"

So if the batch file is already in the dir. there is no point making the directory really, is there and also the current directory of the batch file should be that directory so just

copy "e:\images\2. Pot O Gold Tournament\Kalamazoo Kings\14 YR\GAME 9\8353-DCM-200-2efv9919.jpg" .

should copy it to the batch file directory

hth

Steve

0
 
LVL 67

Expert Comment

by:sirbounty
ID: 18887041
well alright then...
0
 
LVL 43

Expert Comment

by:Steve Knight
ID: 18888473
Thanks for the answer/points... sorry sirbounty!
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article was inspired by a question here at Experts Exchange (http://www.experts-exchange.com/Software/Photos_Graphics/Images_and_Photos/Q_28629170.html). The requirements stated in that question are (1) reduce the file size of a large number of…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question