Jump to content

Recommended Posts

Posted

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?" &"\")
Posted (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 by Danny35d
AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line
Posted

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
Posted

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

Posted

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
Posted

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

Posted

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...