Computer Hope
Microsoft => Microsoft Windows => Windows 10 and 11 => Topic started by: MIRKOSOFT on September 25, 2018, 06:02:00 PM
-
Hi!
I need to copy path of current folder and/or file in that folder by command line.
How to do it in Windows 10, Windows 3.11 and DOS?
Thank you for each help, reply, suggestion or comment.
Miro
-
here's Windows XP onwards... highlight what you want to copy and press ENTER. It's in the clipboard.
(https://images2.imgbox.com/58/76/cSAOcrDz_o.jpg)
-
This works not.
Output is always to named file.
For clipboard exist command CLIP - I tried to get help, but error is that command not exist. I know that can't to be used without parameters - where to get syntax?
Also - exist CLIP in MS-DOS 6.22 ?
And is possible to get path from any variable? Or other way?
Thank you.
Miro
-
....
-
How to do it in Windows 10
Windows 10: Clip
C:\>clip /?
CLIP
Description:
Redirects output of command line tools to the Windows clipboard.
This text output can then be pasted into other programs.
Parameter List:
/? Displays this help message.
Examples:
DIR | CLIP Places a copy of the current directory
listing into the Windows clipboard.
CLIP < README.TXT Places a copy of the text from readme.txt
on to the Windows clipboard.
in this case you could echo %CD%, or use dir /b as Salmon Trout indicated on the file, and redirect it to CLIP to copy the current directory to the clipboard.
Windows 3.11 has no documented user-accessible way of copying data from a command prompt window via a command to the Windows Clipboard (Of course, you can use the control menu to mark and copy text shown in the command prompt window). Programs that are aware of Windows can detect it and will be able to copy and paste to and from the Windows clipboard though.
MS-DOS itself has no concept of a clipboard- only applications do.
-
Ok, thank you!
Now I can use it the way I wanted.
DOS can have replaced clipboard by file content - but only text.
Miro