Wollf Posted February 16, 2009 Share Posted February 16, 2009 i dont know how exactly i can read a files extension and create folder, is there any specific command? here's how i do it but i dont know what to write at the last folder that will send file Filecopy(@GUI_DRAGFILE , @scriptdir & "\" & GUICtrlRead($2) & "\" & guictrlread($pic1) & "\" & "how to read file extension?" &"\") Link to comment Share on other sites More sharing options...
Danny35d Posted February 16, 2009 Share Posted February 16, 2009 (edited) To get the file extension take a look rasim post and to create a folder just add 8 to FileCopy function FileCopy(Source, Target, 8) or use DirCreate function. Edited February 16, 2009 by Danny35d AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Manjish Posted February 16, 2009 Share Posted February 16, 2009 what do u want to do exactly.. u want to copy the dragged file to ur specified loaction?? if that's the case.. then u can do something like this: $dragfile='c:\bogus\toga\cool\hum.txt'; this is ur @guidragfile variable, just replace '$dragfile' with @guidragfile. $array=StringSplit($dragfile,"/") $array1=stringsplit($array[$array[0]],".") MsgBox(4096,"",$array1[2]) here u get the extn "txt" of the file.. i have just used the variable $dragfile for an example.. it will be replaced by @guidragfile.. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
Wollf Posted February 16, 2009 Author Share Posted February 16, 2009 what do u want to do exactly.. u want to copy the dragged file to ur specified loaction?? if that's the case.. then u can do something like this: $dragfile='c:\bogus\toga\cool\hum.txt'; this is ur @guidragfile variable, just replace '$dragfile' with @guidragfile. $array=StringSplit($dragfile,"/") $array1=stringsplit($array[$array[0]],".") MsgBox(4096,"",$array1[2]) here u get the extn "txt" of the file.. i have just used the variable $dragfile for an example.. it will be replaced by @guidragfile.. i want it to read file extension create a folder with the name of extensions and move file in that folder. location isnt specific because the user creates the folders Link to comment Share on other sites More sharing options...
Manjish Posted February 16, 2009 Share Posted February 16, 2009 as i told u my script above tells u the extension..Now simply give it as a name to the folder.. create new folder by.. DirCreate.. specify the location u want.. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com Link to comment Share on other sites More sharing options...
Wollf Posted February 16, 2009 Author Share Posted February 16, 2009 u mean replace $dragfile with @guidragfile or after = ?because @guidragfile='c:\bogus\toga\cool\hum.txt' isnt known because every time it maybe something else Link to comment Share on other sites More sharing options...
Manjish Posted February 17, 2009 Share Posted February 17, 2009 Let it be anything.. it will work everytime.. C'mon try it out man.. don't just speculate.. [font="Garamond"]Manjish Naik[/font]Engineer, Global Services - QPSHoneywell Automation India LimitedE-mail - Manjish.Naik@honeywell.com 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