Jump to content
Sign in to follow this  
2words4uready

File location

Recommended Posts

2words4uready

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
2words4uready

@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
Valuater

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
2words4uready

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
2words4uready

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
2words4uready

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
Jos

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


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     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
2words4uready

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  

×