![]() If the folder was at the top level of a drive, for example C:, right-click the drive. and then select Restore previous versions. Restore deleted files and folders or restore a file or folder to a previous state. If you need the flexibility that comes with rsync then you should probably use one of the synchronisation programs available, or even a source control mechanism. Previous versions are copies of files and folders that Windows automatically saves as part of a restore point. The autoloader I used loaded all of the files and produced fatal errors as it couldn't find some of the class files referenced in the old files. This caused me some problems recently when I changed some filename and locations and then used xcopy to copy a plugin from my localhost to a server. If the folder was at the top level of a drive, for example C:\, right-click the drive, and then select Restore previous versions. It isn't as sophisticated as rsync so if you rename or delete files from your source directory, they won't be changed in your destination directory. Navigate to the folder that used to contain the file or folder, right-click it, and then select Restore previous versions. ![]() xcopy c:\mysourcedirectory c:\mydestinationdirectory /D /I /E /F /Y /H /R Sometimes you might want to force all files to be copied, regardless of their creation time, in which case you can just run the xcopy command without the /D flag. To remove this server directory just use the command popd, which will remove the last network drive you mapped. On a side note, if you try to cd to a server folder in Windows you will see the error "CMD does not support UNC paths as current directories", in which case use the above command to stop this error. ![]() You can now treat the network folder as a local drive and cd around it. Essentially, it goes backwards through the alphabet to find a drive letter that it can use. When you run this command you will be moved to a new directory letter that your system designates. If you want to create a temporary local drive for a server directory then you can use the pushd command. To sync with a remote server can just use a server address and directory name as the destination directory: xcopy c:\mysourcedirectory \\myserver\mydestinationdirectory /D /I /E /F /Y /H /R To sync files from one directory to another you can use xcopy like this: xcopy c:\mysourcedirectory c:\mydestinationdirectory /D /I /E /F /Y /H /R The /F flag is also useful for testing (and probably peace of mind) as it displays full source and destination names while copying.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |