on 06-12-2018 10:08 PM
Hi Experts,
I want to move my files from C:\Files\* folder to C:\Files\Archive with a time stamp of sysdate().
I am using a "bat" file right now to move the folders from C:\Files to C:\Files\Archive without time stamp. How can I append time stamp before I move the files?
This is what I have used in move.bat file -
Move K:\DataFiles\* K:\DataFiles\Archive
Thanks,
Nihar
Hi All,
posting solution in case anyone is interested.
Create a batch script with below code and save the file as "LOCATION.BAT" in Archive folder. I want to move the file from C:\HCI\ folder to C:\HCI\Archive with timestamp.
In CPI, post load script - print (exec($G_BATCHFILE, ' ', 8)); where $G_BATCHFILE a global variable with value - 'C:\HCI\Archive\LOCATION.BAT'
@ECHO OFF
set mydate=%date:~10,4%%date:~4,2%%date:~7,2%
mytime=%time:~0,2%%time:~3,2%%time:~6,2%
REN C:\HCI\LOCATION_FF.CSV LOCATION_FF_%mydate%_%mytime%.csv
MOVE C:\HCI\LOCATION_FF*.CSV C:\HCI\Archive
Thanks,
Nihar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.