relative path doesn't works for copyas() itemlist

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

relative path doesn't works for copyas() itemlist

Post by Stefan »

Minor wish to make it easier:

For copyas() I have to use an full path for the itemlist
but it should be enough to specify the name only
if the item is in the current working folder:

Code: Select all

 foreach($i, $items, "<crlf>")
 {
 if ($i==""){break;}
      //copyas [pattern], [targetpath], [itemlist]

      //this absolute path for itemlist works:
      copyas $i . "_2.xml", ,"<curpath>\Test.xml";

     //relative path doesn't works for itemlist:
     copyas $i . "_2.xml", ,"Test.xml";
 }
------------------

Test

i have this in the same folder:

Test.xml 10byte
Number1.xml 50byte
Number2.xml 50byte
Number3.xml 50byte


and i want that:

Test.xml 10byte
Number1.xml 50byte
Number1_2.xml 10byte
Number2.xml 50byte
Number2_2.xml 10byte
Number3.xml 50byte
Number3_2.xml 10byte

admin
Site Admin
Posts: 66357
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: relative path doesn't works for copyas() itemlist

Post by admin »

Done. :)

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: relative path doesn't works for copyas() itemlist

Post by Stefan »

admin wrote:Done. :)

Code: Select all

v9.90.0912 - 2011-05-12 10:17
    + SC copyas: Now the itemlist parameter supports relative (to current
      list path) paths, e.g.:
        ::copyas "copy-*.png", ,"1.png|2.png";

Sure enough it works :D , thank you.

Code: Select all

foreach($i, $items, "<crlf>")
{
if ($i==""){break;}
      //copyas [pattern], [targetpath], [itemlist]

     //relative path works NOW for itemlist:
     copyas $i . "_2.xml", ,"Test.xml";
}

Post Reply