first: Thank you very much for this good program, and your support :) :) :) :)
Edit (23.02.2015 23:55 <== Thanks to Plerry, who shows me the Syntax: %variable:StrToFind=NewStr%):
I need environment variables for filter settings in *.ffs_batch, *.ffs_gui, they will not be expanded within Filter-Items.
My use case is:
- A disc, which contains a WIN System and user data.
- I want to save the user written data, but not the windows system.
For that I would like to have evaluation of environment variables in Filter-Items (Include | Exclude --> Item).
%HomePath% is expanded to --> \Users\<myName>
It has no DriveLetter, hence i try to use it in Filter-Items.
%WinDir% is expanded to --> C:\Windows
The DriveLetter can removed by:
%WinDir:*:=% is expanded to --> \Windows
I have tested %HomePath% and %WinDir:*:=% both in *.ffs_gui and in *.ffs_batch with a filter-configuration like the following. But the environment variables will not be expanded within the filter-items.
<GlobalFilter>
<Include>
<Item>*</Item>
</Include>
<Exclude>
<Item>\hiberfil.sys</Item>
<Item>\pagefile.sys</Item>
<Item>\System Volume Information\</Item>
<Item>\$Recycle.Bin\</Item>
<Item>\RECYCLER\</Item>
<Item>\RECYCLED\</Item>
<Item>%WinDir:*:=%\</Item>
<Item>%ProgramFiles:*:=%\</Item>
<Item>%ProgramFiles(x86):*:=%\</Item>
<Item>%ProgramData:*:=%\</Item>
<Item>%HOMEPATH%\AppData\Local\Microsoft\Windows\</Item>
<Item>%HOMEPATH%\AppData\Local\Temp\</Item>
<Item>%HOMEPATH%\NTUSER.DAT</Item>
<Item>%HOMEPATH%\ntuser.dat.LOG1</Item>
<Item>%HOMEPATH%\ntuser.dat.LOG2</Item>
</Exclude>
...
</GlobalFilter>
E.g. if the left/right folder pair's are "C:\" and "D:\testFFS",
then e.g. Filter-Item "%WinDir:*:=%\" (expanded to --> "\Windows\") leads to the left/right pathes:
"C:\" + "\Windows\" = "C:\Windows\" = "C:\Windows\"
and
"D:\testFFS" + "\Windows\" = "D:\testFFS\Windows\"
--------
Edit (23.02.2015 23:55):
The following please look as deleted. I'll leave it only for documentation here.
Edit (20.02.2015 20:45):
%HOMEPATH% is expanded --> \Users\<myName>
It has no DriveLetter, hence it can be used in filter Items (in <Include> ... </Include>, <Exclude> ... </Exclude>).
Many environment variables in WIN are expanded to "DriveLetter + Path", e.g.:
%SystemRoot% or %WinDir% --> C:\Windows
%ProgramFiles% --> C:\Program Files
%ProgramFiles(x86)% --> C:\Program Files (x86)
%ProgramData% --> C:\ProgramData
These environment variables can be used in FolderPairs.
If they are used in *filter Items*, the DriveLetter is damaging, because a filter item (e.g. "c:\Windows") is appended to the left/right pair's folder (e.g. "C:\" and "D:\testFFS"):
Then left side: "C:\" + "c:\Windows" = "C:\c:\Windows"
and right side: "D:\testFFS" + "c:\Windows" = "D:\testFFSc:\Windows"
Hence the DriveLetter must be cropped: With "\Windows" (without DriveLetter)
the left side: "C:\" + "\Windows" = "C:\\Windows" = "C:\Windows"
and right side: "D:\testFFS" + "\Windows" = "D:\testFFS\Windows"
works fine.
Hence i ask you for the following treatment of environment variable values used in filter Items:
* If it not begins with "\\" and the 2nd char is not a ":", then do nothing.
* If it not begins with "\\" and the 2nd char is a ":", then use the substring without 1st and 2nd char.
* If it begins with "\\" it is a Universal/Uniform Naming Convention - location.
http://en.wikipedia.org/wiki/Path_%28computing%29#Uniform_Naming_Convention
I think, this can be implemented later, if someone needed it.
Thanks, micha