Hey all,
I have a batch file that deploys to the required environment and i'm
setting it up to output the deploy script into a folder as part of the
build on TFS.
Part of the batch file maps a drive using pushd and then the current path
of the drop. This changes with each build and contains the bu
http://stackoverflow.com/questions/3848597/bat-current-folder-name
set startdir=%cd%
echo %startdir% is my current directory
On 21 August 2013 13:37, Stephen Price wrote:
> Hey all,
>
> I have a batch file that deploys to the required environment and i'm
> setting it up to output the deploy
That won't work because if you double click the bat file in a \\unc share
then you get that error saying the UNC paths are not supported. It then
defaults to the Windows directory, so %cd% would be c:\windows in my case.
I ended up going with this:
@set uncpath=%0:\Dev.deployWeb.bat=%
@pushd %unc
oy script into a folder"
We are using Powershell and msBuild project files and don't have any issues
with UNC paths.
I think the reason is that we get all variables from MsBuild and those are
in the MsDos format: c:\drops\BC03\2013-08-21-06h21\ ...
Variables we use: $(WorkingDir)
Cool, that's good to know.
On 21 August 2013 15:22, Stephen Price wrote:
> That won't work because if you double click the bat file in a \\unc share
> then you get that error saying the UNC paths are not supported. It then
> defaults to the Windows directory, so %cd% would be c:\windows in my c
Slight over optimisation of my script broke it.
this is the working one. :)
set uncpath=%0
set uncpath=%uncpath:\Dev.deployWeb.bat=%
pushd %uncpath%
On Wed, Aug 21, 2013 at 1:21 PM, Preet Sangha wrote:
> Cool, that's good to know.
>
>
> On 21 August 2013 15:22, Stephen Price wrote:
>
>> That