Batch file, change filename with system date and time infor Tags: Programming File Name Filename Apps Last response: December 19, 2010 1:56 PM in Applications Share beidog December 19, 2010 6:37:14 AM I wrote a bat file like this, to changea file name, test.txt to testMonthDayYearTime".txt here is what i wrote: ren c:\example\test.txt test%date:~4,2%%date:~7,2%%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,2%%.txt” But after running, the file name is test12182010 093012.txt, a space is between date and time. I don;t want the space. Anyone know what's wrong. More about : batch file change filename system date time infor Zenthar a b L Programming December 19, 2010 1:56:46 PM What is your system's date and time format? Just do "echo '%date%'" and "echo '%time%'". Can't find your answer ? Ask ! Publish Related resources: ForumBATCH file "grab filename " ForumChange video file to reflect filename in bulk ForumA photo program that does these functions in batch mode? ForumAutomate Log output from Batch File ForumImage Album (Visual) Reordering & Batch Rename Forumchanging the filename in a digicam ForumDOS Batch Script to Determine When ISP Changes my IP Address ForumCan I change incorrect 'picture taken on' date/time ? Forum[SOLVED] Batch file commands not executed ForumChange system date at startup. ForumChanging EXIF Date taken information as a batch ForumOptimum format for filenames? ForumBatch file help ForumBatch File : Display Current Time Zone ForumBatch file renaming based on barcode ForumWindows 7 batch file newbie ForumWhat is the difference between Extended and normal version of a software? ForumSound problem with my R40 IBM Thinkpad ForumHelp with realtek soundcard ForumI need help with CD burning More resources Read discussions in other Applications categories Graphics Internet Applications Multimedia Office Security CAD Distributed Computing Drivers Enterprise Software Firmware Programming Photoshop Skype Wordpress !