Page 1 of 1

How to duplicate binary file with a different name?

Posted: 03 Jan 2015 19:39
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

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

Posted: 03 Jan 2015 19:46
by aliteralmind
Got it:

copyitem "$pkgFile", "$pkgFileZip";

Leaving out that comma is a bad thing:

Image

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

Posted: 04 Jan 2015 00:27
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.

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

Posted: 04 Jan 2015 22:27
by aliteralmind
Good to know, PeterH. Thanks.