Search found 6 matches
- 14 Feb 2011 01:42
- Forum: DOS Batch Forum
- Topic: renaming fails
- Replies: 8
- Views: 10957
Re: renaming fails
What I ended up using is this: pushd %tmpDir% setlocal EnableDelayedExpansion For /F "Tokens=* Delims=" %%T in ('dir/s/b/a-d *.*') do ( ren "%%T" "!random!%%~nT.kvi" ) pause move %tmpDir%\*kvi "C:\renamedFiles\" pause The only difference between the working co...
- 11 Feb 2011 12:03
- Forum: DOS Batch Forum
- Topic: renaming fails
- Replies: 8
- Views: 10957
Re: renaming fails
Thanks alot man! Looks like I might set this in production after all
Have a nice weekend everyone!
Have a nice weekend everyone!
- 11 Feb 2011 06:32
- Forum: DOS Batch Forum
- Topic: renaming fails
- Replies: 8
- Views: 10957
Re: renaming fails
Thanks for the reply! and the kind help so far. When I run this ( i have 2 files which I want to rename) : REM %tmpDir% is defined in end of script pushd %tmpDir% setlocal EnableDelayedExpansion For /F "Tokens=* Delims=" %%T in ('dir/s/b/a-d *.*') do ( ren "%%T" "!random!%%~...
- 10 Feb 2011 01:18
- Forum: DOS Batch Forum
- Topic: renaming fails
- Replies: 8
- Views: 10957
Re: renaming fails
It is not allowed to use quotes around destination.
- 09 Feb 2011 09:56
- Forum: DOS Batch Forum
- Topic: renaming fails
- Replies: 8
- Views: 10957
renaming fails
Hi there! I need to move my randomized files to another directory. Can anyone help me with the right amount of code to accomplish this? What I have is this: REM MOVE TO THE RIGHT DIRECTORY pushd %tmpDir% setlocal EnableDelayedExpansion for /f %%T in ('dir/s/b/a-d *.*') do ( ren "%%T" "...
- 21 Jan 2011 04:18
- Forum: DOS Batch Forum
- Topic: What is wrong with this batch? renaming files in directory
- Replies: 1
- Views: 3377
What is wrong with this batch? renaming files in directory
Hello there! Nice forum! Can anyone tell me what is wrong with my batch-script? I am trying to iterate through a directory renaming all files in it. Hopefully it will append time/date to all the files in that directory. I am not sure I want to have a new fileending (.kvi), so if someone can guide me...