ACalcutt Posted September 21, 2005 Posted September 21, 2005 I am trying to use the dir copy command to do a file backup/sync i tried DirCopy( "X:", "C:\Documents and Settings\Andrew\Desktop\synclocal") DirCopy( "X:\", "C:\Documents and Settings\Andrew\Desktop\synclocal") DirCopy( "X:\Folder", "C:\Documents and Settings\Andrew\Desktop\synclocal") non of them have seems to work. X: is a mapped network drive Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
BigDod Posted September 21, 2005 Posted September 21, 2005 I am trying to use the dir copy command to do a file backup/synci tried DirCopy( "X:", "C:\Documents and Settings\Andrew\Desktop\synclocal")DirCopy( "X:\", "C:\Documents and Settings\Andrew\Desktop\synclocal")DirCopy( "X:\Folder", "C:\Documents and Settings\Andrew\Desktop\synclocal")non of them have seems to work. X: is a mapped network driveHave you tried making the destination somewhere other than the desktop, I seem to remember someone else with a similar problem. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
Valuater Posted September 21, 2005 Posted September 21, 2005 i use this for "talking" to another drive on the network "\\computer-name\c on stelth\tsdata\" 8)
ACalcutt Posted September 21, 2005 Author Posted September 21, 2005 (edited) i cant even get this to work DirCopy( "C:\sync", "C:\syncfolder") there is 1 text file in the c:\sync and c:\syncfolder has nothing....if i run that comman i still have the same thing. am i misunderstanding this function or should it do like i think and copy the text file to c:\syncfolder i was using FileCopy at first...but i need to copy subdirs also...and filecopy doesn't do that Edited September 21, 2005 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
Developers Jos Posted September 21, 2005 Developers Posted September 21, 2005 try DirCopy( "C:\sync", "C:\syncfolder",1) SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past.Â
BigDod Posted September 21, 2005 Posted September 21, 2005 i cant even get this to workDirCopy( "C:\sync", "C:\syncfolder")there is 1 text file in the c:\sync and c:\syncfolder has nothing....if i run that comman i still have the same thing. am i misunderstanding this function or should it do like i think and copy the text file to c:\syncfolderi was using FileCopy at first...but i need to copy subdirs also...and filecopy doesn't do thatIt works for me, but FileCopy should also work if you use the correct flag. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
ACalcutt Posted September 21, 2005 Author Posted September 21, 2005 (edited) try DirCopy( "C:\sync", "C:\syncfolder",1)that did work...but i dont want to overwrite existing files because i am using it to sync mp3 files in a car pc when the wireless connection gets an IP address. this is the only part of the script that wasn't working righti am guessing its not working without overwrite because the folder exists and its set not to overwrite? *edit* i confirmed that if I delete C:\syncfolder DirCopy( "C:\sync", "C:\syncfolder") does workanything else i could do so it won't transfer all these files every time. -----About the filecopy comment. it worked to copy the files usingFileCopy(X:\*.*, C:\syncfolder) but it ignores the dirs...what would i use to make it copy the dirs also? Edited September 21, 2005 by ACalcutt Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
Valuater Posted September 21, 2005 Posted September 21, 2005 maybe like this DirGetSize(@HomeDrive & "\Temp\") If @error= 1 Then DirCreate(@HomeDrive & "\Temp\") EndIf FileCopy(X:\*.*, (@HomeDrive & "\Temp\") ??? 8)
BigDod Posted September 21, 2005 Posted September 21, 2005 FileCopy(X:\*.*, C:\syncfolder) but it ignores the dirs...what would i use to make it copy the dirs also?FileCopy(X:\*.*, C:\syncfolder,8) Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
ACalcutt Posted September 21, 2005 Author Posted September 21, 2005 just curios...where did you get that flag from...in the help file i only see 0 for default and 1 for overwrite Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
Valuater Posted September 21, 2005 Posted September 21, 2005 just curios...where did you get that flag from...in the help file i only see 0 for default and 1 for overwriteFileCopy --------------------------------------------------------------------------------Copies one or more files.FileCopy ( "source", "dest" [, flag] )Parameterssource The source path of the file(s) to copy. Wildcards are supported. dest The destination path of the copied file(s). flag [optional] this flag determines whether to overwrite files if they already exist.Can be a combination of the following: 0 = (default) do not overwrite existing files 1 = overwrite existing files 8 = Create destination directory structure if it doesn't exist (See Remarks). 8)
BigDod Posted September 21, 2005 Posted September 21, 2005 just curios...where did you get that flag from...in the help file i only see 0 for default and 1 for overwriteYou are reading the help file for the release version, we are reading the Beta Help File. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother
ACalcutt Posted September 21, 2005 Author Posted September 21, 2005 You are reading the help file for the release version, we are reading the Beta Help File.so i am guessing i need the beta version for this command to work properly...because using 8 didn't seem to copy the folders either....i will download the beta Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
ACalcutt Posted September 21, 2005 Author Posted September 21, 2005 I found a small commandline utility that does what i need called fsync...its a 76k standalone exe file...comman line ... so RunWait("fsync.exe X:\ C:\syncfolder /S") does what i need or more specific in my program its more like this DriveMapAdd( $MapPath, $NetworkPath) $sync = "fsync.exe " & """" & $MapPath & """" & " " & """" & $LocalPath & """" & " /S" RunWait($sync) Andrew Calcutt Http://www.Vistumbler.net Http://www.TechIdiots.net Its not an error, its a undocumented feature
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now