Guest blackhawk Posted February 8, 2005 Share Posted February 8, 2005 Hello, I´m searching for a funktion, which i can find out the current path of the file. Link to comment Share on other sites More sharing options...
buzz44 Posted February 8, 2005 Share Posted February 8, 2005 Hello,I´m searching for a funktion, which i can find out the current path of the file.<{POST_SNAPBACK}>@ScriptFullPath eg. "C:\Temp\test.txt" @ScriptDir eg. "C:\Temp\"this should be in the suport forum btw qq Link to comment Share on other sites More sharing options...
Guest blackhawk Posted February 8, 2005 Share Posted February 8, 2005 the path should be variable. example: a user save the files on his desktop. The script should copy the file from the current path (which must be variable) to an fix path (c:\temp) and another user could nsave the file in c: then the script must copy the file from c: to c:\temp. Link to comment Share on other sites More sharing options...
Chris_1013 Posted February 8, 2005 Share Posted February 8, 2005 What file? The AutoIt script, a file you select from the script, or something else? Might wanna have a poke in the help file at the File* functions under Function Reference->File, Directory and Disk Management to see if anything there gives you inspiration and post whatever script you have so far. Link to comment Share on other sites More sharing options...
Guest blackhawk Posted February 8, 2005 Share Posted February 8, 2005 yes a file that i select from the script. Link to comment Share on other sites More sharing options...
Chris_1013 Posted February 8, 2005 Share Posted February 8, 2005 Take a look at FileOpenDialog - does this help? Link to comment Share on other sites More sharing options...
Guest blackhawk Posted February 9, 2005 Share Posted February 9, 2005 where can i find this ? Link to comment Share on other sites More sharing options...
Chris_1013 Posted February 9, 2005 Share Posted February 9, 2005 Open the help file... read some stuff... try some things out... then come here when you have problems... Link to comment Share on other sites More sharing options...
zcoacoaz Posted February 9, 2005 Share Posted February 9, 2005 (edited) we need a way to make people read the whole help file before coming here (jk) use this$file = FileOpenDialog ( "title", "default dir", "filter (*.*)" ) FileCopy ( $file, "C:\temp" )ta-da!EDIT: let me correct myselfwe need a way to FORCE people to read the whole help file before coming herejk of couse Edited February 9, 2005 by Xenogis [font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font] Link to comment Share on other sites More sharing options...
SlimShady Posted February 9, 2005 Share Posted February 9, 2005 Try this one. $file = FileOpenDialog ( "title", "default dir", "filter (*.*)" ) ;FileCopy ( $file, "C:\temp" ) $Folder = _GetFolder($file) MsgBox(64, "Test", "The folder of the selected file:" & @CRLF & $Folder) Func _GetFolder($gFile) Local $Match $Match = StringInStr($gFile, "\", 0, -1) Return StringLeft($gFile, $Match - 1) EndFunc BTW, you can select a folder y'know using a function: FileSelectFolder() 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