Discussion forum for all Windows batch related topics.
Moderator: DosItHelp
-
atamo
- Posts: 15
- Joined: 17 May 2010 09:14
#1
Post
by atamo » 11 Apr 2011 12:26
Hy
I need to copy some file in a subfolder of Program Files ,but because Program Files contain a space can't create the directory.
Code: Select all
md c:\Program Files\ProgramName
or
md %ProgramFiles%\ProgramName
Create a new folder with Program's name but I need to make a directory in Program Files
Any ideea ???
Last edited by
atamo on 11 Apr 2011 12:54, edited 1 time in total.
-
!k
- Expert
- Posts: 378
- Joined: 17 Oct 2009 08:30
- Location: Russia
#2
Post
by !k » 11 Apr 2011 12:34
cmd/? wrote:The special characters that require quotes are:
<space>
&()[]{}^=;!'+,`~
-
atamo
- Posts: 15
- Joined: 17 May 2010 09:14
#3
Post
by atamo » 11 Apr 2011 12:48
Thank's , I forget it.....
but
why don't work ?
-
aGerman
- Expert
- Posts: 4678
- Joined: 22 Jan 2010 18:01
- Location: Germany
#4
Post
by aGerman » 11 Apr 2011 13:29
Because %programfiles% expands to the real path. It could contain something like
C:\Program Files and as you can see there is a space again.
Try
as suggested before.
Regards
aGerman
-
atamo
- Posts: 15
- Joined: 17 May 2010 09:14
#5
Post
by atamo » 11 Apr 2011 13:41
you're right, thanks for detailed explanation ,
-
!k
- Expert
- Posts: 378
- Joined: 17 Oct 2009 08:30
- Location: Russia
#7
Post
by !k » 29 Apr 2011 20:35
md "%date:/= %"
/ is your delimiter in date format
also : and \ not allowed in names