 |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
DLUTER
Joined: 16 Mar 2007 Posts: 44 Country: United States |
|
Syncronizing directories. |
|
Hello, i'm trying to sync up 2 directories that contain multiple file formats; my problem is that they only want one file.
Here is my script:
SyncLocalDir( "f:\\24x7\\temp\\*.zip", &
"c:\\xtemp\\dirsync", &
True, False, False, False )
When I run this it throws an error "Directory "f:\\24x7\\temp\\*.zip" not found" Will SyncLocalDir handle wildcards? If not I see a complicated job in my future comparing directory strings and multiple copies. {shivers}
Thanks for any help.
|
|
Thu Nov 01, 2007 7:06 pm |
|
 |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7955
|
|
|
|
Hi,
Sync...Dir commands operate on the directory levels. You cannot add file names or file masks to the directory name parameter. What you want to do can be done with a simple 1 line batch file. Below is not tested code snippet, just to give you an idea.
 |
 |
; this file expects 2 parameters: source and target directory names
for %%f in ("%1\*.zip") do if not exist "%2\%%f" copy "%1\%%f" "%2\%%f" |
|
|
Thu Nov 01, 2007 7:29 pm |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|