Discussion:
batch file command to address clipboard contents
Add Reply
j***@astraweb.com
2025-02-13 21:00:11 UTC
Reply
Permalink
Does anyone know of a batch file command to address the clipboard contents?
(Using win 7 dos emulator)
(No batch file usenet groups seem to be active on astraweb)
VanguardLH
2025-02-14 00:09:27 UTC
Reply
Permalink
Post by j***@astraweb.com
Does anyone know of a batch file command to address the clipboard contents?
powershell -command "Get-Clipboard" > file.txt
Zaidy036
2025-02-14 01:35:15 UTC
Reply
Permalink
Post by j***@astraweb.com
Does anyone know of a batch file command to address the clipboard contents?
(Using win 7 dos emulator)
(No batch file usenet groups seem to be active on astraweb)
free https://nircmd.nirsoft.net/clipboard.html


set - set the specified text into the clipboard.
readfile - set the content of the specified text file into the
clipboard.
clear - clear the clipboard.
writefile - write the content of the clipboard to a file. (text only)
writeufile - write the content of the clipboard to a Unicode file.
(text only)
addfile - add the content of the clipboard to a file. (text only)
addufile - add the content of the clipboard to a Unicode file.
(text only)
saveimage - Save the current image in the clipboard into a file.
copyimage - Copy the content of the specified image file to the
clipboard.
saveclp - Save the current clipboard data into Windows .clp file.
loadclp - Load Windows .clp file into the clipboard.
j***@astraweb.com
2025-02-14 11:40:35 UTC
Reply
Permalink
Post by Zaidy036
Post by j***@astraweb.com
Does anyone know of a batch file command to address the clipboard contents?
(Using win 7 dos emulator)
(No batch file usenet groups seem to be active on astraweb)
free https://nircmd.nirsoft.net/clipboard.html
set - set the specified text into the clipboard.
readfile - set the content of the specified text file into the
clipboard.
clear - clear the clipboard.
writefile - write the content of the clipboard to a file. (text only)
writeufile - write the content of the clipboard to a Unicode file.
(text only)
addfile - add the content of the clipboard to a file. (text only)
addufile - add the content of the clipboard to a Unicode file.
(text only)
saveimage - Save the current image in the clipboard into a file.
copyimage - Copy the content of the specified image file to the
clipboard.
saveclp - Save the current clipboard data into Windows .clp file.
loadclp - Load Windows .clp file into the clipboard.
i want to SET a child environment variable to be the value of clipboard contents when the first four
characters of current clipboard content have a value of "http"
Zaidy036
2025-02-14 17:39:39 UTC
Reply
Permalink
Post by j***@astraweb.com
Post by Zaidy036
Post by j***@astraweb.com
Does anyone know of a batch file command to address the clipboard contents?
(Using win 7 dos emulator)
(No batch file usenet groups seem to be active on astraweb)
free https://nircmd.nirsoft.net/clipboard.html
set - set the specified text into the clipboard.
readfile - set the content of the specified text file into the
clipboard.
clear - clear the clipboard.
writefile - write the content of the clipboard to a file. (text only)
writeufile - write the content of the clipboard to a Unicode file.
(text only)
addfile - add the content of the clipboard to a file. (text only)
addufile - add the content of the clipboard to a Unicode file.
(text only)
saveimage - Save the current image in the clipboard into a file.
copyimage - Copy the content of the specified image file to the
clipboard.
saveclp - Save the current clipboard data into Windows .clp file.
loadclp - Load Windows .clp file into the clipboard.
i want to SET a child environment variable to be the value of clipboard contents when the first four
characters of current clipboard content have a value of "http"
Needs more logic if clipboard may not be text or shorter than 4 or not
lower case.
1. Place clipboard contents in a test variable AA1
2. Place first 4 of AA1 into AA2 set AA2=%AA1:~,4%
-----can combine 1 & 2 into one statement
3. IF %AA2%==http ....
j***@astraweb.com
2025-02-14 21:33:26 UTC
Reply
Permalink
Post by Zaidy036
Post by j***@astraweb.com
Post by Zaidy036
Post by j***@astraweb.com
Does anyone know of a batch file command to address the clipboard contents?
(Using win 7 dos emulator)
(No batch file usenet groups seem to be active on astraweb)
free https://nircmd.nirsoft.net/clipboard.html
set - set the specified text into the clipboard.
readfile - set the content of the specified text file into the
clipboard.
clear - clear the clipboard.
writefile - write the content of the clipboard to a file. (text only)
writeufile - write the content of the clipboard to a Unicode file.
(text only)
addfile - add the content of the clipboard to a file. (text only)
addufile - add the content of the clipboard to a Unicode file.
(text only)
saveimage - Save the current image in the clipboard into a file.
copyimage - Copy the content of the specified image file to the
clipboard.
saveclp - Save the current clipboard data into Windows .clp file.
loadclp - Load Windows .clp file into the clipboard.
i want to SET a child environment variable to be the value of clipboard contents when the first four
characters of current clipboard content have a value of "http"
Needs more logic if clipboard may not be text or shorter than 4 or not
lower case.
1. Place clipboard contents in a test variable AA1
2. Place first 4 of AA1 into AA2 set AA2=%AA1:~,4%
-----can combine 1 & 2 into one statement
3. IF %AA2%==http ....
Thanks. I can work with that. i was hoping there was some utility to bypass the intermediate variable,
but the more i thought about the more i realized that was the way to go.

I see the utility of the nirsoft commands and WRITEFILE return code should tell me if its text, if it
works like i think it should.....

FACE

Loading...