Jump to content

Problem with copy


Vier
 Share

Recommended Posts

I have this part of my code :

If (BitAnd(GUICtrlRead($mv10),$GUI_CHECKED)) Then

For $i = 0 to _GUICtrlListCount($fondbox) -1

$j = _GUICtrlListGetText($fondbox, $i)

RunWait('MAKECAB /D CompressionType=LZX /D CompressionMemory=21 "' & $j & '"',"",@SW_HIDE)

Dim $szDrive, $szDir, $szFName, $szExt

$Path = _PathSplit($j, $szDrive, $szDir, $szFName, $szExt)

$n2 = "d1," & $Path[3]& $Path[4]

$n3 = $Path[3] & $Path[4]

$Path5 = StringReplace ( $Path[4], 4, "_" )

FileMove($Path[1] & $Path[2] & $Path[3] & $Path5,$WCDI,1)

_AJOUTLINE($WCDI & "\Dosnet.inf",'[Files]',$n2,0)

IniWrite($WCDI & "\TXTSETUP.sif","WinntDirectories","500","Web\Wallpaper")

IniWrite($WCDI & "\TXTSETUP.sif","SourceDisksFiles",$n3,"100,,,,,,,500,0,0")

Next

If GUICtrlRead($mv18) <> "" Then

FileOpen($OEMB & "\wallpaper.reg",1)

FileWriteLine($OEMB & "\wallpaper.reg","Windows Registry Editor Version 5.00")

FileClose($OEMB & "\wallpaper.reg")

IniWrite($OEMB & "\wallpaper.reg","HKEY_USERS\.DEFAULT\Control Panel\Desktop","Wallpaper","%SYSTEMDRIVE%\Windows\Web\Wallpaper\" & GUICtrlRead($mv18))

EndIf

EndIf

But in line : FileMove($Path[1] & $Path[2] & $Path[3] & $Path5,$WCDI,1)

The file don't move to the $WCDI = @ScriptDir & "\ProjetXP\01_CDXP\i386"

The file move to @ScriptDir, I'm test with FileCopy : same problem.

I'm use the version of auto-it 3.1.1.102

Edited by Vier
Link to comment
Share on other sites

I have this part of my code :

But in line : FileMove($Path[1] & $Path[2] & $Path[3] & $Path5,$WCDI,1)

The file don't move to the $WCDI = @ScriptDir & "\ProjetXP\01_CDXP\i386"

The file move to @ScriptDir, I'm test with FileCopy : same problem.

I'm use the version of auto-it 3.1.1.102

HI,

maybe it seems to be absurd, but do you use scite and is your script compilable?

Perhaps, you ´ve just forgotten the quotes

FileMove ( "source", "dest" [, flag] )

If not, sorry. Just a thought. :lmao:

So long,

Mega

Scripts & functions Organize Includes Let Scite organize the include files

Yahtzee The game "Yahtzee" (Kniffel, DiceLion)

LoginWrapper Secure scripts by adding a query (authentication)

_RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...)

Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc.

MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times

Link to comment
Share on other sites

HI,

maybe it seems to be absurd, but do you use scite and is your script compilable?

Perhaps, you ´ve just forgotten the quotes

FileMove ( "source", "dest" [, flag] )

If not, sorry. Just a thought. :lmao:

So long,

Mega

Before this line FileMove($Path[1] & $Path[2] & $Path[3] & $Path5,$WCDI,1)

put in a message box to help you debug it, there may be a missing backslash or something

MsgBox (0,"File Move command", $Path[1] & $Path[2] & $Path[3] & $Path5 & " Is going to " &$WCDI)

Link to comment
Share on other sites

I'm test the MSGBox : the path is good ?

I'm test :

FileMove($Path[1] & $Path[2] & $Path[3] & $Path5,$WCDI & "\" & $Path[3] & $Path5,9)

Example : the file name car4.jpg is compress : car4.jp_

The file car4.jp_ is copy to the @ScriptDir and not to the $WCDI ?????

Edited by Vier
Link to comment
Share on other sites

I'm test the MSGBox : the path is good ?

I'm test :

FileMove($Path[1] & $Path[2] & $Path[3] & $Path5,$WCDI & $Path[3] & $Path5,9)

Example : the file name car4.jpg is compress : car4.jp_

The file car4.jp_ is copy to the @ScriptDir and not to the $WCDI ?????

If you run this message box can you post EXACTLY what comes up

MsgBox (0,"File Move command", $Path[1] & $Path[2] & $Path[3] & $Path5 & " Is going to " & $WCDI)

Link to comment
Share on other sites

The MSGBox :

D:\Temp DVD\teaser.jp_ Is going to D:\CreateurXP v2\ProjetXP\01_CDXP\i386

I'm test : FileMove('"' & $Path[1] & $Path[2] & $Path[3] & $Path5 & '"', '"' & $WCDI & '"',9)

Same problem

put a backslash at the end of i386
Link to comment
Share on other sites

The MSGBox :

D:\Temp DVD\teaser.jp_ Is going to D:\CreateurXP v2\ProjetXP\01_CDXP\i386\

With command :

FileMove($Path[1] & $Path[2] & $Path[3] & $Path5,$WCDI & "\",9)

Same problem file move to @ScriptDir and not $WCDI !?

Link to comment
Share on other sites

The MSGBox :

D:\Temp DVD\teaser.jp_ Is going to D:\CreateurXP v2\ProjetXP\01_CDXP\i386\ <--- backslash

With command :

FileMove($Path[1] & $Path[2] & $Path[3] & $Path5,$WCDI & "\",9) <--- one more backslash = \\

Same problem file move to @ScriptDir and not $WCDI !?

Hi, I think you have to meny backslash in you code... isn´t it?

[font="Comic Sans Ms"][center]Powered by AutoIt3http://www.wik-eric.de/zips/Synchro2.2.2-4free.zip[/center][/font]

Link to comment
Share on other sites

I solved my problem during

RunWait('MAKECAB /D CompressionType=LZX /D CompressionMemory=21 "' & $j & '"',"",@SW_HIDE)

The file creat is create to the scripdt dir and not file dir, I suppress FileMove and change makecab command :

RunWait('MAKECAB /D CompressionType=LZX /D CompressionMemory=21 "' & $j & '" /L "' & $WCDI & '"',"",@SW_HIDE)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...