CMD and directory of a shortcut

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Lilinote
Posts: 1
Joined: 02 Sep 2014 08:12

CMD and directory of a shortcut

#1 Post by Lilinote » 02 Sep 2014 08:28

Hi there,

I have a question about CMD and the directory :

- I have a file "pic.jpg" in the folder "fold"
- I created a shortcut of this file and move it
- Here is what I wrote in the shortcut : C:\Windows\System32\cmd.exe /c fold\pic.jpg (I use CMD to open the "pic.jpg", my question is not here)

Here is my question = It seems possible to rename the folder "fold" with some points (folder "..." ) or an empty name (folder " " ), but what I have to write in the shortcut ? (I tried C:\Windows\System32\cmd.exe /c ...\pic.jpg but it doesn't work).

Thanks in advance for your help !

L

penpen
Expert
Posts: 1991
Joined: 23 Jun 2013 06:15
Location: Germany

Re: CMD and directory of a shortcut

#2 Post by penpen » 02 Sep 2014 15:16

Lilinote wrote:It seems possible to rename the folder "fold" with some points (folder "..." ) or an empty name (folder " " ) but what I have to write in the shortcut ?
Even if it were possible to create such folder names, they are not supported by the windows shell and UI:
You cannot reference them using the shell/UI.

See http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#paths:
Naming Files, Paths, and Namespaces wrote:•Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not. However, it is acceptable to specify a period as the first character of a name. For example, ".temp".

penpen

Post Reply