How to make clipboard paste support for file/folder
I would like to do..
clipboard:="D:\myfile"
I thought, when i press ctrl+v, it will paste the file to my location dir.,,But not.
How Can i ?? Help pls..
Edit: Topic subject added ~ gregster
How to make clipboard paste support for file/folder
-
- Posts: 112
- Joined: 06 Jun 2016, 21:32
Re:
Try this:MonuKashyap wrote: ↑18 Apr 2019, 04:44How to make clipboard paste support for file/folder
I would like to do..
clipboard:="D:\myfile"
I thought, when i press ctrl+v, it will paste the file to my location dir.,,But not.
How Can i ?? Help pls..
Code: Select all
FileRead, Clipboard, D:\myfile.txt
-TL
-
- Posts: 112
- Joined: 06 Jun 2016, 21:32
Re: How to make clipboard paste support for file/folder
not for text file friend.
another suggestion??
another suggestion??
Re: How to make clipboard paste support for file/folder
its unclear what u want to happen
Re: How to make clipboard paste support for file/folder
Garbage In Garbage Out
-though above sentence is so strong, but it reveals truth
You have the name of a file you want to copy from here to there
But, you want to copy the content of a file from here to there
So..
You have to use proper FileCopy command with proper usage rules
https://www.autohotkey.com/docs/commands/FileCopy.htm
Regards
-though above sentence is so strong, but it reveals truth
You have the name of a file you want to copy from here to there
But, you want to copy the content of a file from here to there
So..
You have to use proper FileCopy command with proper usage rules
https://www.autohotkey.com/docs/commands/FileCopy.htm
Regards
Re: How to make clipboard paste support for file/folder
or
If you want vomit the contents of current clipboard into a text file
https://www.autohotkey.com/docs/commands/FileAppend.htm
If you want vomit the contents of current clipboard into a text file
https://www.autohotkey.com/docs/commands/FileAppend.htm
-
- Posts: 264
- Joined: 09 Mar 2019, 01:52
- Location: Germany
- Contact:
Re: How to make clipboard paste support for file/folder
If you only need the complete path, just right click with pressed shift key. In the context menu there is the option "copy as path". You don't need AHK for that.
Re: How to make clipboard paste support for file/folder
ah, this one is good too
ClipboardALL with *c option
https://www.autohotkey.com/docs/misc/Clipboard.htm#ClipboardAll
ClipboardALL with *c option
https://www.autohotkey.com/docs/misc/Clipboard.htm#ClipboardAll
Re: How to make clipboard paste support for file/folder
I'm guessing you want to copy file paths to the clipboard so you can paste these files elsewhere, if so you need ClipboardSetFiles() by just me, see here https://www.autohotkey.com/boards/viewtopic.php?p=63914#p63914
Alternatively:
- copy file path(s) the clipboard
- parse the clipboard and use the FileCopy command to copy the files to the destination
- See the first example on the doc here https://www.autohotkey.com/docs/misc/Clipboard.htm (replace MsgBox with FileCopy of course)
- There are also COM and other methods to work with files + explorer - more info collected here https://www.autohotkey.com/boards/viewtopic.php?p=252125
Alternatively:
- copy file path(s) the clipboard
- parse the clipboard and use the FileCopy command to copy the files to the destination
- See the first example on the doc here https://www.autohotkey.com/docs/misc/Clipboard.htm (replace MsgBox with FileCopy of course)
- There are also COM and other methods to work with files + explorer - more info collected here https://www.autohotkey.com/boards/viewtopic.php?p=252125
Re: How to make clipboard paste support for file/folder
I could be wrong but I think everyone is guessing at this wrong. What the OP wants is to be able to automate the task of manual copy/paste on an individual file. So say they click on a file, then press CTRL+C, then go to another folder and press CTRL+V and then that file now makes a copy in the new location.MonuKashyap wrote: ↑18 Apr 2019, 04:44How to make clipboard paste support for file/folder
I would like to do..
clipboard:="D:\myfile"
I thought, when i press ctrl+v, it will paste the file to my location dir.,,But not.
How Can i ?? Help pls..
Edit: Topic subject added ~ gregster
How can they get that file into their clipboard (not the path, but the actual file), so that they can possibly press a hotkey at any given moment and it will load their clipboard with that file, then they can go to another folder and CTRL+V and a copy will pop into the active folder they are browsing in.
-TL
Re: How to make clipboard paste support for file/folder
now ure just describing normal copypaste behavior
Re: How to make clipboard paste support for file/folder
My post covered that.
If you copy a file in explorer you can paste it elsewhere.
If you want to use a script to populate the clipboard to paste one or more file(s) you need ClipboardSetFiles() OR you need to parse the clipboard "as text" as described in the help. Just setting a path (as text) into the clipboard won't make explorer paste it as it needs a "DropEffect" (see the code by just me).
If you copy a file in explorer you can paste it elsewhere.
If you want to use a script to populate the clipboard to paste one or more file(s) you need ClipboardSetFiles() OR you need to parse the clipboard "as text" as described in the help. Just setting a path (as text) into the clipboard won't make explorer paste it as it needs a "DropEffect" (see the code by just me).
-
- Posts: 112
- Joined: 06 Jun 2016, 21:32
Re: How to make clipboard paste support for file/folder
My question is very simple,
""" I just want to copy a file by an ahk script,
but, paste the file without ahk script
without browsing to the location of file.
"""
hope, I could understood you all
""" I just want to copy a file by an ahk script,
but, paste the file without ahk script
without browsing to the location of file.
"""
hope, I could understood you all
-
- Posts: 112
- Joined: 06 Jun 2016, 21:32
Re: How to make clipboard paste support for file/folder
I was also wondering if there is a way to do that
To put is simply
1.Open Notepad and type the location to some file and set a variable to it
Var = C:\File.txt
2.Send that variable into the clipboard but not as a text(which AHK does)but as if you went to that file and copy it
3.Open any folder and since the file in sended to the clipboard in a Copy=>paste way,the Paste menu will be active and you will be able paste that file
As far as I know,AHK can't do this...maybe with some DllCall\COM but I don't understand that part of AHK
To put is simply
1.Open Notepad and type the location to some file and set a variable to it
Var = C:\File.txt
2.Send that variable into the clipboard but not as a text(which AHK does)but as if you went to that file and copy it
3.Open any folder and since the file in sended to the clipboard in a Copy=>paste way,the Paste menu will be active and you will be able paste that file
As far as I know,AHK can't do this...maybe with some DllCall\COM but I don't understand that part of AHK
-
- Posts: 1472
- Joined: 05 May 2018, 12:23
Re: How to make clipboard paste support for file/folder
can file copy help?vsub wrote: ↑01 May 2019, 06:35I was also wondering if there is a way to do that
To put is simply
1.Open Notepad and type the location to some file and set a variable to it
Var = C:\File.txt
2.Send that variable into the clipboard but not as a text(which AHK does)but as if you went to that file and copy it
3.Open any folder and since the file in sended to the clipboard in a Copy=>paste way,the Paste menu will be active and you will be able paste that file
As far as I know,AHK can't do this...maybe with some DllCall\COM but I don't understand that part of AHK
https://autohotkey.com/docs/commands/FileCopy.htm
Re: How to make clipboard paste support for file/folder
FileCopy is a AHK function which is expecting a destination,you can't set "Clipboard" as destination to make the windows Paste function accept it as if went to that file and copy it.
For example,create a file named File.txt in C:\,copy the text from above and make ahk send something(whatever that code is)to windows so when you right click,paste will be active and pasting will paste the File.txt to the location you choose
ClipboardAll can save copied file to a variable and the send it again to the clipboard but you can't send text pointing file location and make it act as if I copied the file
Var := ClipboardAll
msgbox
Clipboard := Var
Exitapp
For example,create a file named File.txt in C:\,copy the text from above and make ahk send something(whatever that code is)to windows so when you right click,paste will be active and pasting will paste the File.txt to the location you choose
ClipboardAll can save copied file to a variable and the send it again to the clipboard but you can't send text pointing file location and make it act as if I copied the file
Var := ClipboardAll
msgbox
Clipboard := Var
Exitapp
Re: How to make clipboard paste support for file/folder
seems like ur looking for lexikos' CopyFileToClipboard: https://autohotkey.com/board/topic/23162-how-to-copy-a-file-to-the-clipboard/?p=150209
idk if this works with 1.1.30.03
try it
idk if this works with 1.1.30.03
try it
-
- Posts: 112
- Joined: 06 Jun 2016, 21:32
Re: How to make clipboard paste support for file/folder
that's not working for meswagfag wrote: ↑04 May 2019, 06:16seems like ur looking for lexikos' CopyFileToClipboard: https://autohotkey.com/board/topic/23162-how-to-copy-a-file-to-the-clipboard/?p=150209
idk if this works with 1.1.30.03
try it
Re: How to make clipboard paste support for file/folder
This is your answer - copy the function from just me's post and try it and it works - https://www.autohotkey.com/boards/viewtopic.php?p=273326#p273326
Who is online
Users browsing this forum: No registered users and 190 guests