Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.msdos.batch.nt    |    Fun with Windows NT batch files    |    68,980 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 67,693 of 68,980    |
|    JJ to Terry Pinnell    |
|    Re: Changing Date Modified?    |
|    27 Nov 20 12:20:50    |
      From: jj4public@gmail.com              On Thu, 26 Nov 2020 11:18:27 +0000, Terry Pinnell wrote:       > Is it possible to achieve the following with either a batch file or       > command prompt on my Win 10 PC please? Or indeed any other hack, such as       > a VBS script, etc?       >       > Parent folders such as one named 'xyz' contain scores or hundreds of       > subfolders. In each of these subfolders, such as one called 'abc', there       > is a single file, called with the same name as its folder but extension       > '.ino', such as abc.ino.       >       > Usually that's the ONLY file. But, in case it proves relevant,       > occasionally there may be one or more other files in that subfolder.       > Even rarer one of those might be named xyz.txt, xyz.jpg, etc.       >       > I want to process all of the *.ino files, from the top parent 'xyz'. I       > don't care if the few files with other extensions get processed or not.       >       > But here's the thing. Somehow the Date Modified entries for all the       > subfolders containing the INO files have lost their original dates. The       > INO files have retained them.       >       > I want to automatically change all the subfolder Date Modified entries       > to equal the Date Modified entry of its INO file of the same name.       >       > Any help will be warmly appreciated please.       >       > Terry              Because batch file alone doesn't provide any command to specifically change       file/folder date, and none of VBScript usable objects can change the date of       a folder (it's possible for file dates, but not for folder dates); the only       possible solution without downloading third party software is to use       PowerShell script. Pre Windows Vista system will still need to download       PowerShell seperately. Or compile either a VB.NET, C#, or JScript.NET       application; if .NET Framework (crap) is available.              Though IMO, I'd rather use third party software for changing folder date       (e.g. GNUWin's build of GNU's `touch`), considering the hassle of executing       PowerShell scripts, slow loading of PowerShell scripts (because it uses .NET       crap), and relatively large memory consumption.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca