![SoftTree Technologies](templates/GreenTech/images/logo.gif) |
SoftTree Technologies
Technical Support Forums
|
|
Author |
Message |
AliM67
Joined: 12 Sep 2019 Posts: 2 Country: Iran, Islamic Republic of |
|
FileTouch Bug? |
|
Hi
In my tests the tool "FileTouch", I faced some problems about file mask:
1) If I want to change a folder (not files/folder inside it), this code doesn't work:
Folder to test: "2"
![](templates/GreenTech/images/code_header.gif) |
![](templates/GreenTech/images/spacer.gif) |
FileTouch.exe /W /A /C /S /D 06-25-2014 /T 13:14:16 2 |
output:
All files/folders inside will be touched not the folder "2"
I suggest that when /R is not used, just folder "2" be touched. With /R option both folder "2" and files/folders inside it be touched.
2) To overcome problem 1, I used below code:
![](templates/GreenTech/images/code_header.gif) |
![](templates/GreenTech/images/spacer.gif) |
FileTouch.exe /W /A /C /S /D 06-25-2014 /T 13:14:16 2 |
output:
![](templates/GreenTech/images/code_header.gif) |
![](templates/GreenTech/images/spacer.gif) |
Search base path:
Search mask: *2*
New file date/time will be 25/06/2094 13:14:16
Processing files...
Folder 2 date/time changed succesfully
File f2.docx date/time changed succesfully
File f1.docx date/time changed succesfully
File libiconv2.dll date/time changed succesfully
File touch.1p.txt date/time changed succesfully
File touch2.exe date/time changed succesfully |
I wonder why files like "f1.docx" and "touch.1p.txt" is touched?
Also there is other files like "libintl3.dll" and others that don't touched.
I can't understand how filemask parameter works. It has bug?
|
|
Thu Sep 12, 2019 8:04 pm |
|
![](templates/GreenTech/images/spacer.gif) |
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7847
|
|
|
|
I'm not able to answer your last question. My general recommendation to avoid ambiguities always specify fully or unambiguously qualified file names like
"C:\data\2"
"C:\data\2\*.*"
".\2"
The results would be different in the above cases
|
|
Fri Sep 13, 2019 1:09 am |
|
![](templates/GreenTech/images/spacer.gif) |
AliM67
Joined: 12 Sep 2019 Posts: 2 Country: Iran, Islamic Republic of |
|
|
|
Thank you for your reply.
I write my tests and conclusion for other users:
------------------------------------------------------
I explain with an example:
for folder named "2" which full path is "C:\data\2"
specify working dir: "C:\data\"
FileTouch.exe /W /A /C /S /D 06-25-2094 /T 13:14:16 filemask
- filemask = 2 or 2\ or "C:\data\2" or "C:\data\2\*.*"
-> Touches files/folders inside folder "2" (one level); folder "2" aren't touched
- filemask = "2\" or "C:\data\2\"
-> Because of "", the path can't be specified correctly and nothing are touched -> so, never use "\" at the end of filemask espicially when use ""
- filemask = *2* or "C:\data\*2*"
-> Touches folders "2" and some other files which are not equal with mask like: f1.docx, touch.1p.txt --> Bug
- filemask = ".\2" or "C:\data\.\2"
-> Touches only folders "2" ; no other files, no files/folders inside folder "2" are touched -> OK
using /R option:
FileTouch.exe /W /A /C /S /D 06-25-2094 /T 13:14:16 filemask
- filemask = 2 or 2\ or "C:\data\2" or "C:\data\2\*.*"
-> Same as above + touches all files/folders in subfolders of folder "2"
- filemask = "2\" or "C:\data\2\"
-> Same as above
- filemask = *2* or "C:\data\*2*"
-> Same as above, can't touch files/folders which equal mask in more levels of subfolder
- filemask = ".\2" or "C:\data\.\2"
-> Same as above, can't touch files/folders in subfolders of folder "2"
------------------------------------
Conclusion:
-To touch file, use exact filename with full path, like "C:\data\test.txt". Doesn't matter use /S or /R option
-To touch folder, use ".\" before folder name, like "C:\data\.\2". use /S option. /R option doesn't affect.
-To touch files/folders (one level) of a folder named "2", use this format: "C:\data\2" or "C:\data\2\*.*". use /S option without /R
-To touch files/folders (all levels of subfolder) of a folder named "2", use this format: "C:\data\2" or "C:\data\2\*.*" with /S /R options
|
|
Fri Sep 13, 2019 5:17 pm |
|
![](templates/GreenTech/images/spacer.gif) |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|