Hello..
I need help to create a script that will do the following:
1. Retrieve a file creation date and time from all the files in a specific folder and save the data to a .txt file.
2. (optional) Archive the .txt file (rar or zip).
3. (optional) Send the file via a VPN to other machine public folder.
The operating system is windows XP.
I don't have much experience in creating batch scripts but I do have programming knowledge in JAVA/C# but i'm thinking that a batch script will be much more preferable than a program.
Thanks.
File properties
Moderator: DosItHelp
Re: File properties
1. Retrieve a file creation date and time from all the files in a specific folder and save the data to a .txt file.
I think it can be done with the dir /? command .
2. (optional) Archive the .txt file (rar or zip).
Whhhza I need to reboot
use 7zip
Re: File properties
Code: Select all
@echo off
setlocal
SET target=dir_date.txt
IF EXIST %target% DEL /Q %target% >nul
echo.
echo == ( 1 )
echo.
FOR /F %%i IN ( 'dir /b' ) DO CALL :format %%i
echo.
echo == ( or )
echo.
dir /c
echo ==
goto :eof
:format
ECHO %~t1 - %1>>%target%
ECHO %~t1 - %1