looking tool to change date of file according the folder

Discuss anything related to portable freeware here.
Post Reply
Message
Author
User avatar
giulia
Posts: 535
Joined: Sat Sep 14, 2013 8:09 am

looking tool to change date of file according the folder

#1 Post by giulia »

Hi
I'm looking for a tool that can change the date modified and creation of a bunch of files §(for example ) according the main folder
for example a many folders with mp3 and the date of them was changed by some software , would like to set the date using the main folder

I would like with a lot of different files that are inside different folder

thanks, take care

User avatar
Andrew Lee
Posts: 3063
Joined: Sat Feb 04, 2006 9:19 am
Contact:

Re: looking tool to change date of file according the folder

#2 Post by Andrew Lee »

Off the top of my head, I can suggest nircmd, using the setfiletime command, which supports wildcards.

This solution, however, requires you to manually enter the date/time of the main folder, but you can probably obtain that value by a bit of clever scripting.

User avatar
Pendrive
Posts: 37
Joined: Mon May 11, 2020 4:37 am

Re: looking tool to change date of file according the folder

#3 Post by Pendrive »

DELETED
Last edited by Pendrive on Mon Sep 25, 2023 5:52 pm, edited 1 time in total.

User avatar
giulia
Posts: 535
Joined: Sat Sep 14, 2013 8:09 am

Re: looking tool to change date of file according the folder

#4 Post by giulia »

Pendrive wrote: Fri Dec 23, 2022 4:21 pm I think Attribute Changer is close to what is wanted but it is NOT portable.

https://www.petges.lu/
hi
I will try it
thanks

User avatar
NunoSilva
Posts: 55
Joined: Thu Nov 17, 2022 5:27 am
Location: Brazil

Re: looking tool to change date of file according the folder

#5 Post by NunoSilva »

FileTool 3.0 works on a folder (and its subfolders) on your disk:

Set the attributes of all files and folders. (Read-only, Hidden, Archive, System)
Change the date of all files and folders.
Create a list as text file of all files and folders.
Calculate the MD5 signature of all files.
List binary and text version of all EXE and DLL files.
Search for duplicate (triple...) files.
... also via network.

Changing the date of all files in a folder is very useful for archiving purposes: If you set all the dates of your MP3 files e.g. to the 1.1.2000 00:00 you will recognize the files, which where added since the last backup by their different date.

https://www.softpedia.com/get/PORTABLE- ... Tool.shtml

TP109
Posts: 571
Joined: Sat Apr 08, 2006 7:12 pm
Location: Midwestern US

Re: looking tool to change date of file according the folder

#6 Post by TP109 »

Swiss File Knife includes a touch command that should work in a script such as the batch script below. If the working directory is set to "%~dp0", the working directory is changed to wherever the batch file is placed. Note: Corrected error which caused script not to process folder names with spaces.

Code: Select all


@echo Off

Rem -- Prepare the Command Processor
Setlocal Enabledelayedexpansion

Title %~nx0
REM Description: Changes modified and last accessed dates for all 1st REM level 
REM files in subfolders of the working directory set below.


REM ----------------------- Set working dir-----------------------------------
REM change to current directory
pushd "C:\Users\TP\Desktop\test\changefiledatesfolder"


REM ----------------- Set path for external apps-------------------------------
REM set path for external apps
set path="F:\Utilities\commandlinetools\swissFileKnife";%path%



for /d %%a in (*) do (
 Pushd %%a
 set dir1=%%~a
 echo Processing directory "%%a" with date/time of %%~ta && echo.
 call :dirfiles "%%~fa"
 Popd
 )

echo.
echo Processing completed ....
goto closefile


:dirfiles
 for %%b in (*.*) do (
 sfk touch -from "%~1" "%%~b"
 )
 goto:eof



:closefile
pause
exit B/0




Post Reply