[pmwiki-users] Easily move attachments from one page to another?

Petko Yotov 5ko at 5ko.fr
Fri Apr 23 03:32:29 CDT 2010


On Tuesday 20 April 2010 23:53:48, Karl Schilke wrote :
> I just decided that I want to move some of the files currently
> attached to a page to a different page. There's no obvious way to do
> this easily.
...
> Is there a better way to do this, short of logging into the server and
> manually shuffling the files around behind PmWiki's back?

It depends -- you can rename the uploads sub-directory, or move the files to a 
new directory, if you log into the server via SSH or FTP. On the server, you 
have the pmwiki directory, then inside the "uploads" directory, then more 
directories and files.

If you have per-page attachments (as explained in the UploadsAdmin page), it 
is easy. To move the files to a different page in the same wikigroup, just 
rename the directory (folder) to the new name :
  pmwiki/uploads/Main/HomePage to
  pmwiki/uploads/Main/OtherPage

If for some reason you cannot rename or move the directory, it may be possible 
to just move the files. Create the new directory, select all files in the old 
one, select Edit-Cut (or press Ctrl+X), go to the new directory and select 
Edit-Paste (or Ctrl+V). IIRC this works with the standard windows explorer, 
and it does work with Konqueror/Krusader.


If you have per-group attachments, there is no way of knowing which files 
were attached to which page: all are considered attached to any page of that 
group. So, in a different page of the same group, all your Attach:, 
(:attachlist:) or other markups related to uploads should work the same way.

Lastly, you can always link to uploads in different groups or pages:

  Attach:Page/image.jpg          another page in the same group
  Attach:Group.Page/image.jpg    page in another group
  Attach:Group./image.jpg        another group with per-group uploads,
                                 note the dot after Group.
Thanks,
Petko



More information about the pmwiki-users mailing list