Strahan Posted October 26, 2008 Share Posted October 26, 2008 It's easy in VB with the filesystemobject, but I just started using PHP 5.2.6 under Windows 2003 server and alas I don't know the corresponding method in PHP. Thanks! Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted October 26, 2008 Share Posted October 26, 2008 What do you mean "get them"? I've always just understood 8.3 file names to be a naming convention... something you conform to, not something you create. Quote Link to comment Share on other sites More sharing options...
Strahan Posted October 26, 2008 Author Share Posted October 26, 2008 Well, I have a piece of code that passes a file to a launcher. Right now in vbscript it looks like this: Set FS = CreateObject("Scripting.FileSystemObject") Set File = FS.GetFile("Some Random Video.avi") Shell.Launch "viewprogram.exe " & File.ShortName That runs viewprogram.exe and passes it "somera~1.avi". The "shortname" property is how I am getting the 8.3 format in vb. Is there something similar in PHP? I have a filename and I need to get the 8.3 format name of it. Quote Link to comment Share on other sites More sharing options...
genericnumber1 Posted October 26, 2008 Share Posted October 26, 2008 From all of the php functions I know of, there's no specific function for that... sorry :X that's not to say you couldn't write your own. Quote Link to comment Share on other sites More sharing options...
discomatt Posted October 26, 2008 Share Posted October 26, 2008 This would be pretty tricky to do. Why on earth do you need the SFN? Quote Link to comment Share on other sites More sharing options...
trq Posted October 26, 2008 Share Posted October 26, 2008 The code you have posted can be written exactly the same from within php's com extension. Quote Link to comment Share on other sites More sharing options...
Strahan Posted November 7, 2008 Author Share Posted November 7, 2008 I need SFN for a legacy app that gets pissy with spaces. Thanks for the com suggestion thorpe, that worked like a champ! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.