Your advice will be appreciated.
How to copy the content of text files without opening files?
-
paul0
- Posts: 137
- Joined: 23 Oct 2009 19:26
How to copy the content of text files without opening files?
I am just curious about how to copy the content of text files to an editor without opening files
Your advice will be appreciated.
Your advice will be appreciated.
-
Filehero
- Posts: 2731
- Joined: 27 Feb 2012 18:50
- Location: Windows 11@100%
Re: How to copy the content of text files without opening fi
Oxymoron? Technically, files have to be opened to access their content for copy.paul0 wrote:I am just curious about how to copy the content of text files to an editor without opening files![]()
Usually a text editor is used for manual editing. So, I wonder why you just don't use the "open"-command?
Cheers,
Filehero
-
paul0
- Posts: 137
- Joined: 23 Oct 2009 19:26
Re: How to copy the content of text files without opening fi
Sometimes, I just copy some content for editing and keep the original file intact. The way doesn't require to backup the file either.
XYplorer is VERY powerful.
I started to be a little lazy....
XYplorer is VERY powerful.
-
Slavaon
- Posts: 158
- Joined: 29 Mar 2012 07:35
Re: How to copy the content of text files without opening fi
Use InfoTip Extension 2.0.4.106 (License free)
“If you press the following keys when InfoTip is shown, the InfoTip content
will be copied to the clipboard.
[Ctrl] key -> File's full path text.
[Shift] key -> content text.”
Windows all, the seventh х64 too
“If you press the following keys when InfoTip is shown, the InfoTip content
will be copied to the clipboard.
[Ctrl] key -> File's full path text.
[Shift] key -> content text.”
Windows all, the seventh х64 too
-
paul0
- Posts: 137
- Joined: 23 Oct 2009 19:26
Re: How to copy the content of text files without opening fi
Thanks for sharing.Slavaon wrote:Use InfoTip Extension 2.0.4.106 (License free)
“If you press the following keys when InfoTip is shown, the InfoTip content
will be copied to the clipboard.
[Ctrl] key -> File's full path text.
[Shift] key -> content text.”
Windows all, the seventh х64 too
I use another similar tool called FileMenu.
-
Filehero
- Posts: 2731
- Joined: 27 Feb 2012 18:50
- Location: Windows 11@100%
Re: How to copy the content of text files without opening fi
Copy your file first (e. g. to a temp folder), and then call open(). Simple as that.paul0 wrote:Sometimes, I just copy some content for editing and keep the original file intact. The way doesn't require to backup the file either.
Cheers,
Filehero
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: How to copy the content of text files without opening fi
Maybe make an temp copy of that file first?paul0 wrote:I am just curious about how to copy the content of text files to an editor without opening files![]()
like:
Code: Select all
if (get("CountSelected") == 1) {
//user settings:
$file = "<curname>";
$temp = "%temp%\xy";
$copy = "COPY_$file";
//code:
copyitem $file, "$temp\$copy";
run notepad "$temp\$copy";
//delete [recycle=1], [confirm], [itemlist]
delete 1, 1, "$temp\$copy";
}else{
msg "Please select ONE file only!":
}
-
paul0
- Posts: 137
- Joined: 23 Oct 2009 19:26
Re: How to copy the content of text files without opening fi
Thanks, Stefan. This is a perfect solution.Stefan wrote: Maybe make an temp copy of that file first?
-
aimy
- Posts: 186
- Joined: 26 Feb 2007 15:44
Re: How to copy the content of text files without opening fi
XYplorer 11.40.0100
Why I got this error? Thank you.
Why I got this error? Thank you.
To see the attached files, you need to log into the forum.
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to copy the content of text files without opening fi
Any info on when you get it, on which operation, using a script or not, etc., etc., etc....
One of my scripts helped you out? Please donate via Paypal
-
aimy
- Posts: 186
- Joined: 26 Feb 2007 15:44
Re: How to copy the content of text files without opening fi
I assigned the above script by Stephan to the user button.highend wrote:Any info on when you get it, on which operation, using a script or not, etc., etc., etc....
I click on one text file, then click that user button.
Then the error comes.
Thank you.
-
highend
- Posts: 14942
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: How to copy the content of text files without opening fi
Unable to reproduce with a simple text file an Stefan's script...
v11.40.0005
v11.40.0005
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club