I have an application that generates a directory with some files in it when it is opened. I would like to access some files in this directory to export them and also import into this directory. The directory structure looks like this:
+ Folder I know
+ Auto Generated Folder 'Name changes every time
-SomeFile
-SomeFile2
+macro
-macro1
-macro2
-macro3
I want to work with just the files under the 'macro' sub directory. I have a working export solution using the 'for' command that looks at the 'Folder I know' and does a does a match:
for /R "C:\Folder I know\" %f in ("macro*") do @xcopy "%f" "destination path" /u /y
The /u switch on the xcopy command even allows me to only update files that already exist in the destination. Now the question is, how do I do the same thing but in reverse? I want to copy files from a folder (say c:\temp) and update them in the macro folder only if they are already there.