How to escape a space [Solved]
Posted: 16 May 2014 04:53
Hi,
I want to write a script that make a hardlink of files I selected to a folder for synchronization purposes.
I need to specify the separator to be a space, I tried '\ ', '\s', all doesn't work, please help me.
Here is the script:
foreach($var, <selitems>, separator= ) {
goto "! mklink /h".$var."C:\sync"
}
The reference for mklink
mklink – a command line tool included with Vista and Server 2008 and above. The most current link creation tool included with Windows. It creates Hard Links, Symbolic Links and Junction Points.
usage: mklink [[/d] | [/h] | [/j]] <NameofLink> <Target>
/d – Creates a Symbolic Link for a directory. If no flag used, creates a Symbolic Link for a file (default)
/h – Creates a Hard Link
/j – Creates a Junction Point
<NameofLink> – The name for the Symbolic Link being created
<Target> – The relative or absolute path of the target
/? – Help
Thank you very much!
I want to write a script that make a hardlink of files I selected to a folder for synchronization purposes.
I need to specify the separator to be a space, I tried '\ ', '\s', all doesn't work, please help me.
Here is the script:
foreach($var, <selitems>, separator= ) {
goto "! mklink /h".$var."C:\sync"
}
The reference for mklink
mklink – a command line tool included with Vista and Server 2008 and above. The most current link creation tool included with Windows. It creates Hard Links, Symbolic Links and Junction Points.
usage: mklink [[/d] | [/h] | [/j]] <NameofLink> <Target>
/d – Creates a Symbolic Link for a directory. If no flag used, creates a Symbolic Link for a file (default)
/h – Creates a Hard Link
/j – Creates a Junction Point
<NameofLink> – The name for the Symbolic Link being created
<Target> – The relative or absolute path of the target
/? – Help
Thank you very much!