Sign in to follow this  
Followers 0
2words4uready

File location

9 posts in this topic

is there some code so that the program can determine its location because my program will get downloaded to various places on a computer and it moves its self to a folder so that it wil work


READ BEFORE POSTINGMy UDF'sMessagesYou say plz because its shorter than please. I say no because its shorter than yes.Join My Website

Share this post


Link to post
Share on other sites



@ScriptDir ?

so would this code work

$location = @ScriptDir
$copy = $location & "\myfile.exe" 
FileCopy( $copy, "C:\mylocation")

READ BEFORE POSTINGMy UDF'sMessagesYou say plz because its shorter than please. I say no because its shorter than yes.Join My Website

Share this post


Link to post
Share on other sites

so would this code work

$location = @ScriptDir
 $copy = $location & "\myfile.exe" 
 FileCopy( $copy, "C:\mylocation")
did you try it?

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

so would this code work

$location = @ScriptDir
$copy = $location & "\myfile.exe" 
FileCopy( $copy, "C:\mylocation")
lets say the name of my file got changed is there code that could also return the name of the file

READ BEFORE POSTINGMy UDF'sMessagesYou say plz because its shorter than please. I say no because its shorter than yes.Join My Website

Share this post


Link to post
Share on other sites

lets say the name of my file got changed is there code that could also return the name of the file

nvm the code is @ScriptName

READ BEFORE POSTINGMy UDF'sMessagesYou say plz because its shorter than please. I say no because its shorter than yes.Join My Website

Share this post


Link to post
Share on other sites

did you try it?

8)

it prints out a file called my location any help?

READ BEFORE POSTINGMy UDF'sMessagesYou say plz because its shorter than please. I say no because its shorter than yes.Join My Website

Share this post


Link to post
Share on other sites

nvm the code is @ScriptName

Try reading the helpfile and just try things. That is really the best way to learn.

Then when you really cannot figure it out you can post here in the support forum.

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Try reading the helpfile and just try things. That is really the best way to learn.

Then when you really cannot figure it out you can post here in the support forum.

Jos

got it working the code was
$location = @ScriptDir & "\" &  @scriptname
FileCopy( $location, "C:\location" & "\" & @scriptname)

READ BEFORE POSTINGMy UDF'sMessagesYou say plz because its shorter than please. I say no because its shorter than yes.Join My Website

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