If you have only '-newer file' then you can use this workaround:
# create 'some_file' having a creation date of 16 Mar 2010:
touch -t 201003160120 some_file
# find all files created after this date
find . -newer some_file
man touch:
-t STAMP
use [[CC]YY]MMDDhhmm[.ss] instead of current time
Assuming that your touch has this option (mine is touch 5.97).
Create a file with a space at the end:
echo Foo > "\\?\c:\rcs\boo.txt "
List files on system in a batch file with modified date and bare listing:
for /f "tokens=*" %%A in ('dir /s/b %target%') do @echo %%~tA,"%%~A"
For example, a directory with three files including "boo.txt " looks like:
, "C:\rcs\boo.txt "
02/03/2011 17:48, "C:\rcs\foo1.txt"
02/03/2011 17:47, "C:\rcs\foo2.txt"
Note how the file date is missing. This could be your clue that the file name is illegal.
Take a look at filelist.exe from [http://www.jam-software.com/freeware/].
This program creates an expanded listing (many more data points) but doesnt balk at attributes like date.
Deleting is easy, renaming is harder.
The following tool renamed "boo.txt " to boo.txt
http://wren.adoxa.cjb.net
wren.exe boo~1.txt boo.txt
took care of the filename.
Note: Wren appears to have a 16 and 32 bit versions - I used the 16 bit one to perform the rename, and was constrained to renaming it to a 8.3 filename. You should be able to work around this.
Best Answer
Something like this should do the trick :
Here i have used a multiple commands approach using
sh -c 'command1; command2'
andsed
to clear_128
in the filename.