How to duplicate binary file with a different name?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
aliteralmind
Posts: 261
Joined: 02 Dec 2014 16:49

How to duplicate binary file with a different name?

Post by aliteralmind »

Not sure why I'm not getting this.

Could someone please show me how to use XY-script to copy (not rename)

Code: Select all

C:\Users\aliteralmind\AppData\Roaming\Sublime Text 3\Installed Packages\SideBarEnhancements.sublime-package
and then paste it as

Code: Select all

C:\Users\aliteralmind\AppData\Roaming\Sublime Text 3\Installed Packages\SideBarEnhancements.sublime-package.zip
Windows 8.1, 64-bit

aliteralmind
Posts: 261
Joined: 02 Dec 2014 16:49

Re: How to duplicate binary file with a different name?

Post by aliteralmind »

Got it:

copyitem "$pkgFile", "$pkgFileZip";

Leaving out that comma is a bad thing:

Image
Windows 8.1, 64-bit

PeterH
Posts: 2827
Joined: 21 Nov 2005 20:39
Location: DE W11Pro 24H2, 1920*1200*100% 3840*2160*150%

Re: How to duplicate binary file with a different name?

Post by PeterH »

OffTopic: To specify just a variable you don't need quotes.

copyitem $pkgFile, $pkgFileZip;

The quotes say that you specify a string.
The double quotes *allow* to specify variables mixed with the string. But: there is no string.

Real usage example: instead of Msg "x = ".$x."!";
you may shorten to Msg "x = $x!";
Here the variable inside double quotes would make sense.

aliteralmind
Posts: 261
Joined: 02 Dec 2014 16:49

Re: How to duplicate binary file with a different name?

Post by aliteralmind »

Good to know, PeterH. Thanks.
Windows 8.1, 64-bit

Post Reply