AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Solved]FileCopy problem with folder [Folder]

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Acris



Joined: 18 Jan 2010
Posts: 193
Location: Switzerland

PostPosted: Thu Mar 11, 2010 7:06 am    Post subject: [Solved]FileCopy problem with folder [Folder] Reply with quote

Hello,
I have problem, you can not copy the [BOOT] on my USB key
all other files and folders are OK except this one why?

Code:

DVD=I:\
vardriveletter=J:

Loop, %DVD%*,2,1
{
folder:=A_LoopFileFullPath
;msgbox %folder%
;if A_LoopFileName not in IMAGES,GAIA,SERVICING,BOOT,FONTS,EFI,MICROSOFT,SOURCES,EN-US
folder:=Regexreplace(folder,DVD "\(.*)","$1")
;msgbox %folder%
folder=%vardriveletter%\%folder%
folders.=folder "`n"
FileCreateDir,%folder%
}
SB_SetText(COPFILES)
Loop,%DVD%*,0,1
anzahl:=A_INDEX
Loop,%DVD%*,0,1
{
file:=A_LoopFileFullPath
file:=Regexreplace(file,DVD . "\(.*)","$1")
file=%vardriveletter%\%file%
files.=file . "`n"

;MsgBox Copying %A_LoopFileFullPath% to %file%
;if A_LoopFileName not in ACERBOOT_FOLDER.TAG
FileCopy,%A_LoopFileFullPath%,%file%,1
zahl:=(100 / anzahl) * A_INDEX
Progress, %zahl%, %a_loopfilename%, Copies des fichiers
Sleep, 50
}
Progress,Off
SB_SetText(ENDOF)   
Sleep, 2000
SB_SetText("")

Drive, Eject, %DVD%
msgbox %INSERTDVD2%
IfMsgBox, OK
{
Goto, CopyDVD2
}


Can you help me ?

Thank a lot
Acris


Last edited by Acris on Thu Mar 11, 2010 9:50 am; edited 1 time in total
Back to top
View user's profile Send private message
garry



Joined: 19 Apr 2005
Posts: 2214
Location: switzerland

PostPosted: Thu Mar 11, 2010 8:19 am    Post subject: Reply with quote

just an idea, try to copy drive c to drive s,
can break when close DOS window
(don't understand regex yet, should learn)

Code:
#persistent
A=xcopy "c:\*.*" /k /r /e /i /s /c /h s:\
runwait, %comspec% /k %a%
onexit
exitapp
Back to top
View user's profile Send private message
Acris



Joined: 18 Jan 2010
Posts: 193
Location: Switzerland

PostPosted: Thu Mar 11, 2010 9:08 am    Post subject: Reply with quote

Hi Garry,
I do not use DOS commands.
it is pointless to use AutoHotkey, My batch code would have been sufficient
I expect more than the use of AutoHotkey
I want to know why the copy is not

Sorry i use google translate for help me.

Je ne souhaite pas utilise de commandes dos.
Mon code batch utilisait xcopy, et j'attends mieux de l'utilisation de autohotkey que encore utiliser des commandes dos.


EXAMPLE :

Code:
folder:=A_LoopFileFullPath
msgbox %folder% -------------------------------------->D:\BOOT OR D:\OPT
folder:=Regexreplace(folder,DVD "\(.*)","$1")
msgbox %folder% -------------------------------------->BOOT OR OPT
folder=%vardriveletter%\%folder%
msgbox %folder% --------------------------------------> I:\BOOT
FileCreateDir,%folder% -------------------------------> FileCreateDir, I:\BOOT


BUT D:\[BOOT] not create Folder and files Confused

Edit : it's ok it's boot sector of DVD Confused

Sorry
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group