Advertisement

06.10.2008 at 12:47PM PDT, ID: 23473625 | Points: 500
[x]
Attachment Details

Batch File using UNC Path in DTS package failing?

Asked by laustandphound in Windows Batch Scripting, MS SQL DTS

Tags: , ,

Ok.  This is a little complicated.  I have a dts package setup to put a file in XLS format.  THe next step of the DTS package is supposed to run a batch file to rename that file in correspondance to the previous month.  In the batch file itself (below) We are using a UNC path.  On fail, I have the DTS Setup to email me.  It emails me and says that the Batch file fails.  But it actually did not.  

Out of curiousity I put a pause command in the batch file and ran it manually and got this error.

"'\\192.168.1.4\it\Batch Files'
CMD.EXE was started with the above path as the current directory.
UNC paths are not supported.  Defaulting to Windows directory.
The system cannot find the file specified.
Press any key to continue . . ."

When I check the file, it is renamed.  I would still like to get rid of the Error saying that it has failed.  

Any ideas or further questions?  Just let me know Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
@echo off
 setlocal
 
 set/a reportmonth=10*%date:~4,1%+%date:~5,1%
 set reportyear=%date:~10,4%
 
 if "%reportmonth%"=="1" set/a reportyear=%reportyear%-1
 if "%reportmonth%"=="1" set reportmonth=13
 set/a reportmonth=%reportmonth%-1
 
 if %reportmonth% LSS 10 set reportmonth=0%reportmonth%
 
ren "\\192.168.1.4\IT\POS Reports\POS_Banner_AL_TSI.CSV"  POS_Banner_AL_TSI_%reportyear%%reportmonth%.CSV
 
pause
 
Loading Advertisement...
 
[+][-]06.10.2008 at 01:11PM PDT, ID: 21754638

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.10.2008 at 02:38PM PDT, ID: 21755326

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 04:51AM PDT, ID: 21758940

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 04:52AM PDT, ID: 21758950

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 04:54AM PDT, ID: 21758964

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 04:57AM PDT, ID: 21758981

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 04:59AM PDT, ID: 21758992

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 05:08AM PDT, ID: 21759072

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 05:14AM PDT, ID: 21759121

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 06:27AM PDT, ID: 21759793

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 06:30AM PDT, ID: 21759825

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 06:42AM PDT, ID: 21759941

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 07:09AM PDT, ID: 21760176

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.11.2008 at 09:21AM PDT, ID: 21761648

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.24.2008 at 10:59AM PDT, ID: 21858445

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.28.2008 at 03:59PM PDT, ID: 21892293

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.14.2008 at 07:41AM PDT, ID: 22230722

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628