Questions tagged [subst]
42 questions
1
vote
2 answers
"if exist Z:\xfile\NUL" returns true for file xfile if Z: is mapped to a network drive
I have Z: substituted to a network drive, eg:
subst Z: \\fc\c
xfile is a file (not a directory!) that exists in the root of the substituted drive. The below statement incorrectly echoes -exists-
if exist z:\xfile\nul echo -exists-
This makes…

Paul Houle
- 735
- 9
- 17
1
vote
0 answers
TFS, subst, Visual Studio 2010, relative paths
My TFS workspace is at C:\Users\...\MyProject, which I have mapped to X:\ using Windows subst command. In my Visual Studio 2010 solutions, this works fine for most of the projects. Only 2 of them are always linked (absolutely!) wo the C:\Users\...…

Matthias Meid
- 12,455
- 7
- 45
- 79
1
vote
1 answer
Cutting two string elements
Alright so I am basically trying to cut 2 parts of a string
$string = "505 Space X 24";
Now what I am trying to do is basically cut everything besides Space X
So the output would be
"Space X"
Now, I dont know what will be the first number or the…

Tomislav Nikolic
- 193
- 11
1
vote
4 answers
Command Line "subst" on Startup... The system cannot find the specified drive?
So my teachers were all big fans of the Command Prompt and we're always using it, so I got used to it, and now I can't live without it, it's always open, my mouse is just a secondary accessory. So today, I wanted to create a virtual drive and make…

Maxwell
- 101
- 2
- 10
1
vote
1 answer
SUBST: How to map to D: drive
subst x: myFolder
Works as expected.
Maps a new drive 'X' to the files of "myFolder".
subst d: myFolder
Invalid argument - D:
Why is that?
Does this mean, that it is not possible to map do D:\ ?
subst (without parameters) prints nothing (or only…

Best_Where_Gives
- 481
- 2
- 22
1
vote
2 answers
How to use Files.getFileStore() for substed drive (on Windows)?
When invoking Files.getFileStore() on a substed drive (on Windows), this results in following error:
The directory is not a subdirectory of the root directory
For example with:
subst P: C:\temp
running:
public static void main(String[] args)…

mstrap
- 16,808
- 10
- 56
- 86
1
vote
3 answers
modifying a cpp make file to .c file is not working
I am trying to modify a makefile that builds cpp to a c file, but I am running into some string substitution problem. I wonder if someone can point out the mistake.
here's a piece of the file:
SOURCES := \
lz4.c \
lz4frame.c \
lz4hc.cpp…

gmmo
- 2,577
- 3
- 30
- 56
1
vote
1 answer
Creating a powershell batch file to create a disk label from existing persistent network shares
I'm trying to create a batch file using windows powershell that will look for existing persistent network shares and take their path to create a name, much like a custom disk label.
I'm a novice but know the start point can be based on the…

Ogriff
- 41
- 1
- 3
1
vote
2 answers
Makefile subst variable not affected?
I want to perform a string substitution in my Makefile. I can easily do this with a string literal like so:
foo:
echo $(subst /,-,"hello/world")
Which yields the expected:
hello-world
But when I switch to using a variable, I can't seem to get…

jCuga
- 1,523
- 3
- 16
- 28
1
vote
1 answer
"subst" where indices to be equated also use subst
I'm stuck on the following. I have the derivation of a pi calculus transition that takes place in some context Γ, plus a proof that Γ ≡ Γ′. I would like to coerce the derivation into a transition in Γ′, using subst. The details of the setting are…

Roly
- 2,126
- 2
- 20
- 34
1
vote
1 answer
Executing Subst command in PowerShell
Would anybody help in executing Subst command in PowerShell; so that it reflects the virtual drive in Windows Explorer!
Thanks in anticipation.

Raabi Anony
- 25
- 2
- 8
0
votes
3 answers
How to create a virtual drive on windows in Rust?
How to create a virtual drive on Windows in Rust? (Similar to what the subst command does on windows)
I don't seem to find such an API in Rust.

Kerwin Bryant
- 137
- 1
- 3
- 11
0
votes
1 answer
subst variable names with "point"
Let's say I have this code :
set a 1
set a.b a
set thing a.b
puts [subst $$thing]
The answer I would expect on the last line would be "a", but tcl answers 1.b
I tried to put \ everywhere before the . but it didn't changed anything.
Is there away to…

heyhey
- 191
- 2
- 12
0
votes
0 answers
make file substantial command
I am learning make and ran across a few commands that I do not understand. Can anyone help me understand these commands please?
I have the following few lines from a larger make file.
blank :=
blank +=
type_switcher = $(or\
$(if $(subst…

noobee
- 57
- 3
0
votes
0 answers
sympy: substitution by the value of a symbol
Sir,
Is it possible to use the value of a variable to make a subsitution ?
Example:
x = symbols("x")
c = IndexedBase("c")
eq1 = c[0] + c[1]*x+c[2]*x**2
x1 = 2
eq1.subs(x,x1)
Nothing change.
How can we use the value of x1, here 2 ?
Sincerely.

Pascal KREZEL
- 61
- 3