开发者

In ASP, is it possible to list files from a shortcut?

I created a shortcut, in Windows, to a folder. I then placed this shortcut in another place. Using ASP, is it pos开发者_高级运维sible to list the files in the folder via the shortcut? All folders, files, links, etc. are on the same drive.


Classic ASP uses VBScript or JScript. If you can list the files with those, then you can do it in ASP.


IF the webhotel on the IIS has access rights through the filesystem, then it should be possible to simulate.

I've never seen anything but the windows desktop being able to use the shortcuts as is for anything else but shortcuts.

I've heard of some FTP servers using them though, dont know if it was special shortcuts or those made directly from within windows desktop.

BUT - if I had your problem, I would examine the fileformat for the shortcuts (.lnk) and look for syntax/ways to open these extensions from ASP through filesystem operations like "read file".

Then once you've retrieved the path from within the .lnk file, then you can do a simple "list files in a folder" with standard functions from the filesystem API.


This might work but I must admit I hate using Shell object in ASP script:-

 Function ResolvePath(path)

     set wsh = CreateObject("WScript.Shell")
     set link = wsh.CreateShortcut(path)
     ResolvePath = link.TargetPath

 End Function
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜