Search todays folder and copy to destination
Posted: 08 Jul 2022 09:45
Hi,
I want to search source folder for todays date and if it exits then copy a particular folder from it, to shared network destination and extract all the files from it and paste it.
source folder c:/Reports/(todaysdate)
particular folder : softimages
network 192.168.1.130
user xxx
password xxx
destination folder f:\images
copy all files from softimage to f:\images
I have this codes to search for date folder and your expert help is required.
I want to search source folder for todays date and if it exits then copy a particular folder from it, to shared network destination and extract all the files from it and paste it.
source folder c:/Reports/(todaysdate)
particular folder : softimages
network 192.168.1.130
user xxx
password xxx
destination folder f:\images
copy all files from softimage to f:\images
I have this codes to search for date folder and your expert help is required.
Code: Select all
@echo off
for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a"
set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%"
set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%"
set "datestamp=%dd%%mm%%yyyy%_FR
echo "%datestamp%"