Jump to content

Recommended Posts

Posted

if you use filecopy('mary.jpg','c:\images\mary.jpg',8)

means filecopy(@workingdir&'\mary.jpg','c:\images\mary.jpg',8)

if you are running te script in the same directory of mary.jpg it works.

Instead filecopy('c:\my images\img\mary.jpg','c:\images\mary.jpg',8)

indipentent of your working dir (runnin script dir) it copies c:\my images\img\mary.jpg in c:\images\mary.jpg

Sorry for my english.

A lan chat (Multilanguage)LanMuleFile transferTank gameTank 2 an online game[center]L'esperienza è il nome che tutti danno ai propri errori.Experience is the name everyone gives to their mistakes.Oscar Wilde[/center]
Posted

I try to copy a compiled script itself to another folder using the FileCopy function but should I key in the 'Full' destination address?

Can use a relative path from your working directory.

If DirCreate('mypictures')
    FileCopy(@ScriptFullPath, 'mypictures\')
EndIfoÝ÷ ÚÚ~ée¥«a¶¢W^­«­¢+Ù%¥É
ÉÑ ÌäíèÀäÈíµåÁ¥ÑÕÉÌÌäì¤(¥±
½Áä¡MÉ¥ÁÑÕ±±AÑ °ÌäíèÀäÈíµåÁ¥ÑÕÉÌÀäÈìÌäì¤)¹%

You do not need to use the filename in the destination unless you want to rename the file. :)

Posted (edited)

Do I need to include the full directory destination if i'm copying the script ITSELF?

Thank you. :)

if you want to copy the script that you are using do what MHz said

If DirCreate('D:\mypictures')
    FileCopy(@ScriptFullPath, 'D:\mypictures\')
EndIf

@ScriptFullPath retrieves the full path of your script

i cant understand your question has been answered , please explain better exacly what you want, your script to copy itself or to copy another file..

Edited by Gif
Posted

Script ITSELF.

The fullpath to the script is @ScriptFullPath. So, use @ScriptFullPath as I have shown in post #7 and as Gif above has tried to reassure you of.

FileCopy(@ScriptFullPath , 'C:\directory\' , 8)

Using 8 as the flag parameter will create the directory. If you want file overwrite also, then use 9.

:)

Posted

So by using the @ScriptFullPath function, I don't have to include the script's location but only the destination to be copied to?

NOTE: Using the FileCopy function to copy the script itself to another location.

yes, thats what we 've been telling you

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...