Force RoboCopy to copy files even if they have not changed - robocopy

What is the proper syntax to force RoboCopy to copy files even if they have not changed (ie. replace the file in the destination with the source file even if the source or destination files have not changed)?
File extensions I'm working with are .XMP files (Adobe camera RAW files), and PSD (Photoshop document files).
(I use RoboCopy to automate the process of copying these files from my photo editing drive to a backup drive and want to ensure that RoboCopy always copies all changes made to these files.)

Related

How to use robocopy to copy files from a folder folders (robocopy need to go through every subfolder and check for files)

#Looping through header files and copy to src/for_src folder
%foreach file_h in $(FOR_INCLUDE_FILES,A)
%exec robocopy /MIR $(FOR_INCLUDE_DIR) $(FOR_PROJECT_OUTPUT_DELIVERY_DIR)/ASM/src/for_src $(file_h,B,>.h)
%endfor
With the above lines i am trying to loop thru the list of files and trying to only copy the matching files of the list using robocopy.
The source directory is a mother folder inside two other folders were there namely asil and QM
My expectation is to search for the file in every iteration inside those sub folders and copy them to the destination folder.
Please help me on how to do copy only the matching files and search inside folder folders for the matching files.

Restore corrupted TFS files from $tf\ .gz files?

My hard disk had errors and I lost a number of files before they could be checked in. But I'm wondering if there's a way to look in the \$tf folder's .gz files to restore the files that were lost and not checked in? Any chance a diff version was saved in there that I can restore from?
But I'm wondering if there's a way to look in the \$tf folder's .gz files to restore the files that were lost and not checked in?
I am afraid you could not to restore the files based on the .gz files.
The .gz files are generated when mapping sources, which keeps a hash and some additional information on all file in the workspace so that it can do change tracking for Local Workspaces and quickly detect the changes in the files. But it does not contain source files. If you do not check the source files in the source control, TFS could not restore those files from the source.
To restore those files, you need to find a way to recover hard disk data.
Hope this helps.

Install4j "Copy files and directories" installer action does not copy the file directory path

I do a backup of the files that need to be replaced as part of the installation. For this I use the above action. However, it just copies the files in the child directory to the destination directory but not the directory hierarchy of the source to the destination directory. Example: I have a some files in this directory structure \dir1\dir2\dir3\files. It copies only the files under dir3 but not the \dir1\dir2\dir3. I need to preserve the directory structure in the backup. Can anyone help with this please?
I am using Windows 7 Enterprise.
Thanks very much.
You have to select the root directory in the action, i.e. the one containing "dir1". Then, it will copy the whole directory tree to the destination.
If you want to copy only parts of the directory tree, use the "Directory filter" and "File filter" properties.

robocopy - how to copy from source to destination while the source is being copied to

I have a source and a destination, i am trying to copy from source to destination using robocopy.
The catch is that I want to start robocopy as soon as i start copying files to a source. This means that the source will keep updating while I copy the source to a destination.
Any idea how this can be accomplished?
Have a look at File System Watcher http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.changed(v=vs.110).aspx
Create an app that keeps on running in background, and checks for Directory size change, And whenever it changes, trigger a copy event.

Renaming .nupkg to .zip

We have recently changed our build process to output only .nupkg files and one of our clients doesn't like this idea.I have renamed the .nupkg files to .zip and I can access the files.
My question is... is it acceptable to rename the file extension or will it damage any of the files, compression isn't an issue, so it doesn't matter about that, we just need to be able to give them a .zip version.
No, the contents of a file are not changed when the filename is changed and your files in the .nupkg won't get damaged by renaming it to .zip.