Stuttgart Posted December 19, 2003 Share Posted December 19, 2003 The file "Che" has no extension, is a shortcut, and is in the same dir as the script. I would like a copy on the Desktop. I receive no error messages and the code continues after the statement. I even searched to see if the shortcut copy ended up somewhere else.... not the case. FileCopy("Che","C:\Documents and Settings\All Users\Desktop",0) Link to comment Share on other sites More sharing options...
Valik Posted December 19, 2003 Share Posted December 19, 2003 Shortcuts have the file extension ".lnk". Try "Che.lnk" as the file. (That's a lower-case L, not an uppercase i) Link to comment Share on other sites More sharing options...
Stuttgart Posted December 19, 2003 Author Share Posted December 19, 2003 Thank you! works great now! Link to comment Share on other sites More sharing options...
scriptkitty Posted December 19, 2003 Share Posted December 19, 2003 (edited) I wrote this little script to see what the actual dos filename was: if $CmdLine[0]<>0 then $name = FileGetShortName ( $CmdLine[1]) msgbox(1,"Short Name",$name ,40) ClipPut ( $name ) else msgbox(1,"Short Name","Drag and Drop a file here to show small name",10) endif It shows you the filename in the msgbox, and copies it to the clipboard with the full dos path as well. Comes in handy. edit... works great after you compile it. Edited December 19, 2003 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
CyberSlug Posted December 19, 2003 Share Posted December 19, 2003 (edited) Certain extensions are always hidden by Windows because of the presence of a REG_SZ entry named NeverShowExtIf you want to always show LNK file extensions, then delte NeverShowExt fromHKEY_CLASSES_ROOT\lnkfile .You can also use AlwaysShowExt registry value. Note that both registry settings overrride whether you have chosen to to "hide extensions for known file types" via Folder Options in the control panel.P.S. Nice util, scriptkitty Here's a related program: ; Put compiled version in the Send To menu ; and it copies long path(s) to clipboard If $CmdLine[0] > 0 Then $tmp = "" For $i = 1 to $CmdLine[0] $tmp = $tmp & $CmdLine[$i] & @CRLF Next ClipPut( StringTrimRight($tmp,2) ) EndIf Edited December 19, 2003 by CyberSlug Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig! Link to comment Share on other sites More sharing options...
w_sp8er Posted December 20, 2003 Share Posted December 20, 2003 thank you CyberSlug for that little script i've tried it, works great! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now