Creating a symbolic link with ColdFusion

2019-08-26 13:50发布

问题:

This is a real toughy... Google doesn't seem to have any clue... So I leave it to my lovely friends here...

I'm trying to create a symbolic link of a file with ColdFusion... and I'm starting to get pretty peeved with not being able to resolve this as yet...

here's my code so far...

<cfset argString = '/c mklink #UserScreenPath##AdvertSubDirectory#\backgrounds\#AdvertBackgroundFilename# #Path#files\clients\#UserID#\assets\backgrounds\#AdvertBackgroundFilename#' >

<cfexecute name="cmd.exe" arguments="#argString#" outputFile="" timeout="0" />

Given that The variables are all legit and resolve correctly and that the directories resolving to the source and destination directories are also legit... What the hell am I missing?

I've tried using CFCATCH and that's come up with nothing! The environment ColdFusion is running in is Windows XP, thus the cmd.exe call...

回答1:

Windows XP doesn't include a way to make symbolic links. You can, however, use the Junction tool.