Home »
Windows
»
Windows Oddities
Read the article that everyone's commenting on.
Subscribe to the RSS Feed for comments on this article.
I am trying to create a batch file that will rename all dvr-ms files to mpg in a specific directory on a daily basis, instead of using the copy command and doubling the used disk space per file (about 4gb), I am trying to use the --fsutil hardlink create-- command to create a duplicate filename just with a different extension in the same directory. HOWEVER... when I use the "*." identifier to perform this action, it tells me that I cant do that. This is the string that I am entering: "fsutil hardlink create d:\record~1\*.mpg(new) d:\record~1\*.dvr-ms(old)" what am I doing wrong?
Posted by: Jon at November 19, 2006 12:34 PMYou'll need to look into the FOR statement and execute the command one file at a time.
A simple example of FOR:
FOR %F IN (*.MPG) DO echo %F
I think you should be able to construct a FOR that does what you want. It'll take some experimentation, so do back up your files :-).
Posted by: Leo Notenboom at November 19, 2006 8:42 PMCygwin (www.cygwin.com) can be used to access the linux file handling commands making hard links usage much simpler. It also works on windows 2000.
For example, rsync can be used to create what appear to be multiple full backups. Since it can use hard links, the backups are actually incremental "under the hood", thus potentially saving a massive amount of backup space.
For example:
rsync -a --delete --link-dest=prevBackupDir dirToBackup currBackupDir
will backup dirToBackup into currBackupDir. Any files that have not changed since prevBackupDir was made will be created as hard links to the prevBackupDir version. I.e. (almost) no disk space is required for these unchanged files.
I use this to keep 10 full nightly backups of a 23G directory on an external drive. It only takes rougly 31G of drive space instead of 230G.
Posted by: Allen at October 22, 2009 7:07 AMTo post a comment on "Can the same file have two different names?", please return to that article's main page.