Search found 40 matches
- 07 Apr 2008 17:51
- Forum: DOS Batch Forum
- Topic: Affect the result of a command in a variable
- Replies: 1
- Views: 5702
- 07 Apr 2008 17:36
- Forum: DOS Batch Forum
- Topic: What is dropped on this batch: file or folder? (a solution)
- Replies: 2
- Views: 6798
Looks good. Have a play about with this and see if you get something you like?: Drag and drop a file or dir to see. ECHO FILE ATTRIBUTES echo %~a1 PAUSE This could be useful for something I'm working on. This reads in a drag and dropped bunch of image files (e.g. dsc_0411.tif) and sorts them into an...
- 07 Apr 2008 17:21
- Forum: DOS Batch Forum
- Topic: Incremental count in a FOR loop
- Replies: 4
- Views: 10112
Looks like part of a nested for loop? To get variables to evaluate inside a for loop you need to enable delayed expansion and use ! instead of % to indicate the variable to expand when the interpreter gets to it, rather than at the opening of the for statement. Try something like this. SETLOCAL ENAB...
- 15 Mar 2008 20:16
- Forum: DOS Batch Forum
- Topic: Batch file with variables
- Replies: 4
- Views: 9822
- 01 Feb 2008 15:48
- Forum: DOS Batch Forum
- Topic: DOS Batch / XP Command prompt file rename to remove spaces.
- Replies: 10
- Views: 20649
- 31 Jan 2008 18:17
- Forum: DOS Batch Forum
- Topic: DOS Batch / XP Command prompt file rename to remove spaces.
- Replies: 10
- Views: 20649
Thanks! Unfortunately though, that runs into similar problems, 1. It starts to rename the top level dirs before the subdirs. Once it does this it can't find the subdirs and errors. 2. the REN command is too weak for this, you can't rename a file including path to another file including path.(or can ...
- 28 Jan 2008 12:56
- Forum: DOS Batch Forum
- Topic: How was I called?
- Replies: 6
- Views: 12403
- 25 Jan 2008 14:57
- Forum: DOS Batch Forum
- Topic: How to Open a word document and close it using Batch file.
- Replies: 1
- Views: 6947
- 25 Jan 2008 14:28
- Forum: DOS Batch Forum
- Topic: Checking Command Line Parameters in WINXP Batch
- Replies: 0
- Views: 8700
Checking Command Line Parameters in WINXP Batch
Hi all Just wrote this batch file to check the command line params in a batch file I'm working on. Posting here as a referance and in case it is useful for others. Or can anyone improve on it? If anyone has any feedback that would be nice cheers. @echo off SETLOCAL ENABLEEXTENSIONS SETLOCAL ENABLEDE...
- 25 Jan 2008 14:23
- Forum: DOS Batch Forum
- Topic: DOS Batch / XP Command prompt file rename to remove spaces.
- Replies: 10
- Views: 20649
DOS Batch / XP Command prompt file rename to remove spaces.
Hi all Does anyone have a script or algorithm for searching through a directory tree of files and renaming any that have spaces in the file names and directory names? e.g. to have a _ instead of a space. Most files won't have a space. The code below does it but it's not great and it's slow (when you...