|
| ||||||||||
| Tags: date, insert, script |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| ||||
| ||||
| Script insert date in the name of my file
Here is the 1st time I try to create a script to run on Windows my script is designed to take a file the Zipper after the end rename and copy it to another folder Infact we all generally works well but is a small concern is that in one part of my name I must insert the current date and then it freezes !!!!!! what I try to do me Quote:
but it does not work, so if you have any other ideas to insert date in the filename ? still one last issue I want to know is that it is possible to run my script automatically at a specific hour every day? thank you in advance for your help. |
|
#2
| ||||
| ||||
| Re: Script insert date in the name of my file
It depends on what format you want to find your date eg for YYYY-MM-DD, you do set dat =% date: ~ 7.4% -% date: ~ 4.2% -% date: ~ 1.2% for details: set /? |
|
#3
| |||
| |||
| Re: Script insert date in the name of my file
No, but with the "/" It is true that for a file name that is not: for the coup, it seeks to create a folder: D |
|
#4
| ||||
| ||||
| Re: Script insert date in the name of my file
ren Folder1 * CIT8550L00_3680_010_001_%% _B1220I dat-APZ * I do not know if it is a facet of the Slashdot editor, but there is a space before and after dat%% And since there was no quotation marks around the string, rename must be difficult to navigate. To detail closely with the%% dat defined above ren File1* CIT8550L00_3680_010_001_%dat%_B1220I-apz* ren Folder1 * CIT8550L00_3680_010_001_%% _B1220I dat-APZ * will result in ren Filer1* CIT8550L00_3680_010_001_2008-10-29_B1220I-apz* ren Folder1 * CIT8550L00_3680_010_001_2008-10-29_B1220I-APZ * |
|
#5
| ||||
| ||||
| Re: Script insert date in the name of my file
Thank you very much it helped me. In fact the problem was the / so it had to be removed from the date. thank you once again |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Script insert date in the name of my file" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to insert automatic date in a website | Patrickboy | Software Development | 8 | 04-05-2012 10:49 AM |
| How to insert last date in excel 2010 | Calum | Windows Software | 5 | 17-02-2010 11:07 PM |
| Insert date format in SQL via ASP | Bansi_WADIA | Software Development | 4 | 04-12-2009 09:56 PM |
| Script to insert new line in a file in linux | OSzilla | Operating Systems | 3 | 28-07-2009 11:48 PM |
| Script to insert IP camera on web page | huzmat | Software Development | 3 | 04-05-2009 03:57 PM |