Well, you can't create junctions for folders in non-NTFS volumes like mounted network drives.
If you want to add whole contents of P: drive to some virtual folder and refresh it automatically following script should be enough:
Code: Select all
<add >Refresh { <silent <for /d %%f . * { <ifcond { !script @ %%f } { <del /rfd "%%f" } } <put /d . P:\* }
After cleaning <put command will add whole P:\ contents (all files and folders) to current virtual folder.
If you have somewhere text file with list of files/folders that you want to see in some virtual folder (paths w/o trailing slash!), you may use following script:
Code: Select all
<add >Refresh { <silent <for /d %%f . * { <ifcond { !script @ %%f } { <del /rfd "%%f" } } <put /adl . "C:\path\to\filelist.txt" }
After cleaning <put command will add files/folders from specified filelist to current virtual folder (new items will be autorenamed if objects with same name already exist).
First part of both scripts will clear all folder contents except script files before filling with actual contents.