Questions tagged [subst]

42 questions
12
votes
1 answer

Substitute: replacement evaluation

Is the first and the second substitution equivalent if the replacement is passed in a variable? #!/usr/bin/env perl6 use v6; my $foo = 'switch'; my $t1 = my $t2 = my $t3 = my $t4 = 'this has a $foo in it'; my $replace = prompt( ':' ); #…
sid_com
  • 24,137
  • 26
  • 96
  • 187
10
votes
2 answers

How to mount a substed drive in windows Ubuntu subsystem

My development environment on Windows includes substed folders, i.e. the folder c:\MyBuild may be substed to a drive letter, say t: In a Ubuntu subsystem terminal, I can bind the folder to a mount, as this sudo mount --bind /mnt/c/MyBuild…
Totte Karlsson
  • 1,261
  • 1
  • 20
  • 55
8
votes
2 answers

Resolve Windows drive letter to a path (subst and network)

I wonder if there is a universal way of resolving a path using a drive letter (such as X:\foo\bar.txt) into its equivalent UNC path, which might be one of the following: X:\foo\bar.txt if X: is a real drive (i.e. hard disk, USB stick,…
Pierre Arnaud
  • 10,212
  • 11
  • 77
  • 108
6
votes
1 answer

Getting command line output in VBScript (without writing to files)

I'm using VBScript, and my goal is to be able to substitute a drive letter for a path of my choosing. I need the D drive, and if it's not available I need to check if it's already mapped to the right spot; then notify the user if it's not. I found…
213897
  • 1,561
  • 4
  • 15
  • 16
4
votes
2 answers

How to do replicate Window's subst command in Python?

I am trying to map a virtual drive on my windows setup one of the tools I am using does not like the spaces in the filenames. On the command line, I would do the following subst l: "c:\Program Files\Complier\version 6.0\bin" I tried to replicate…
tehnyit
  • 1,152
  • 1
  • 9
  • 16
3
votes
1 answer

powershell: wrong symbolic link resolution

i think i found a bug in PS. i create a new subst'ed drive letter: C:\> subst k: c:\test C:\> subst K:\: => c:\test but PS tells: PS C:\> get-item 'K:\' | Format-list | Out-String Directory: Name : K:\ Mode : d----- LinkType …
mmoossen
  • 1,237
  • 3
  • 21
  • 32
3
votes
3 answers

How do you retrieve the original location of a mounted path?

In C++, how can I retrieve the location of a mounted drive? for example, if I have mounted drive s: to c:\temp (using subst in the command line) "subst c:\temp s:" how can I get "c:\temp" by passing "s:" I would also like to know how can it be done…
Adam Oren
  • 799
  • 1
  • 6
  • 18
3
votes
2 answers

Subst drive & folder

Can I use windows command subst to map a drive & folder to another location? I want to map say the temp folder c:\foo\bar\temp to e:\buildserver\dev I can easily map the temp directory to e: using subst e: c:\foo\bar\temp But how can I also add…
ojhawkins
  • 3,200
  • 15
  • 50
  • 67
3
votes
1 answer

Using Rundll32 to replicate the function of SUBST

I have been attempting to replicate the function subst.exe (windows app for mapping drives) using rundll32. I know that DefineDOSDevice is used and I know what parameters to pass but I just can`t get it to work. Lets just say I want C:\Program Files…
2
votes
0 answers

creating a subst drive from a selection of folders

I am new to the world of programming and trying to make a small script where I can select a folder with a name that will chance and make this selected folder a subst drive. The code that I already found on this site is pretty good, but it seems that…
Yngisrev
  • 21
  • 1
2
votes
1 answer

Calling SUBST from Windows batch file

I have problem calling SUBST from a Windows batch file. I want to use one batch to create a virtual drive mapping and a second batch to unmount the drive. However unmounting gives the error message: The system cannot find the path specified. Here…
Juergen
  • 956
  • 1
  • 9
  • 24
1
vote
1 answer

"Drive already SUBSTed" on deletion of virtual drive in jenkins pipeline on a windows server

I'm trying to create and use virtual drive in my jenkins pipeline (to avoid the limit of 260 character in windows) I can create virtual drive using the SUBST command but I cannot delete them which cause problems after the first run... Jenkins is…
ManquatLo
  • 21
  • 2
1
vote
2 answers

cmd - Is it possible to temporarily assign an available drive letter to a local path?

Using cmd on Windows, it is easy to assign a drive letter to a UNC path with pushd: C:\Windows\> pushd \\server\share\path Y:\> popd C:\Windows\> However I would like to be able to do the same with local paths because it will shorten the file paths…
Benoit
  • 76,634
  • 23
  • 210
  • 236
1
vote
1 answer

subst-if throws error work on tree in Common Lisp

Why am i getting this error: The value (2 (2 (2 (2 (2) 2) 2) 2) 2) is not of type NUMBER when binding SB-KERNEL::X [Condition of type TYPE-ERROR] when calling the subst-if with the follwoing test function: (defun 2p (N) (= N…
user4813927
1
vote
2 answers

Windows service fails to start, with generic error

I wrote a trivial NT service using VS2010 and it does install on my XPSP3 dev box just fine, using InstallUtil. However when I run net start TestService I get a generic error:The TestService service failed to start due to the following error: The…
Chris O
  • 5,017
  • 3
  • 35
  • 42
1
2 3