Sign in to follow this  
Followers 0
cabbage-programer

Filecopy problems.... ?

5 posts in this topic

Will i am having a bit of trouble (once again, lol) with some script because i want to use that script below which works but when it copys the file it keeps it as the name is the orignal file it is copied from and i want it to change it to a different name but it is that same file, could someone help me out with this problem please or tell me another way it can be done?

script:

FileCopy(@ScriptFUllPath, @homeDrive & "\" & @ScriptName)

The code above works but it only gets put into "c:\" so i found another way but it still has a problem, the one i really need help with. (i explained the problem above)

This is what the code looks like which i am currently tring to use but it has that problem i explained before.

Script:

FileCopy(@ScriptFUllPath, "C:\new\ " & @ScriptName, 8)

The code above makes a folder and copys the file into it but the problem is when the file is copied into that folder it is called the same as the original file but i want to call it something different, how do i do that?

Could someone help me out because i have been looking in the help for along time and having no luck so this was my last option (which i dont like doing because i am a bad explainer and ask stupid questions because i am still learning how to use autoit).

Thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

FileCopy(@ScriptFUllPath, @homeDrive & "\Insert the new name here")

Edited by nobby

CheersNobby

Share this post


Link to post
Share on other sites

FileCopy(@ScriptFUllPath, @homeDrive & "\Insert the new name here")

i think that worked (in a way?) but im not sure because it makes that file and changes it name but when it is put in that directory it is nothing like its file type is called "file" its unknown, so how do i make it so it is the same as the file you open (.exe or .au3) ??

could you show me a example of it so the is copied to (eg, c:\new\) and then make it so it is copied as a .exe or .au3, please? if that makes sense.

thanks

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

i think that worked (in a way?) but im not sure because it makes that file and changes it name but when it is put in that directory it is nothing like its file type is called "file" its unknown, so how do i make it so it is the same as the file you open (.exe or .au3) ??

could you show me a example of it so the is copied to (eg, c:\new\) and then make it so it is copied as a .exe or .au3, please? if that makes sense.

thanks

:lmao:

FileCopy(@ScriptFUllPath, @homeDrive & "\Insert the new name here.extensionhere")

Edit:

Common sense plays a roll in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Edited by SmOke_N

[center]Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.[/center]

Share this post


Link to post
Share on other sites

:lmao:

FileCopy(@ScriptFUllPath, @homeDrive & "\Insert the new name here.extensionhere")

Edit:

Common sense plays a roll in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

sorry for asking dumb questions but its because i am new to autoit because i usually use visual basic but i prefer autoit better in ways but i wish it had like a visual side to it like visual basic so that you can actually set the layout easier but its still a very useful program.

thanks everyone who replied and helped me out and being understanding to new users who are extra thick like my self, lol. o yeah i got the command to work thanks to all who replied.

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0