Search found 56 matches
- 06 Apr 2018 09:37
- Forum: DOS Batch Forum
- Topic: Space in a variable
- Replies: 4
- Views: 5211
Re: Space in a variable
you are very welcome
- 06 Apr 2018 08:35
- Forum: DOS Batch Forum
- Topic: Space in a variable
- Replies: 4
- Views: 5211
Re: Space in a variable
1. use code tags to wrap your code [code]<your code>[/code]
2. i belive there is a space after "SET COGDIR=!NS!\CREM" (select it and you'll see)
2. i belive there is a space after "SET COGDIR=!NS!\CREM" (select it and you'll see)
- 05 Apr 2018 10:45
- Forum: DOS Batch Forum
- Topic: moving files
- Replies: 21
- Views: 17140
Re: moving files
ohh... now it all makes sense, htnks for explanation
- 05 Apr 2018 10:32
- Forum: DOS Batch Forum
- Topic: moving files
- Replies: 21
- Views: 17140
Re: moving files
@echo off &setlocal DisableDelayedExpansion for %%i in (*.*) do if "%%~i" neq "%~nx0" for /f "tokens=* delims=." %%j in ("%%~xi") do ( if not exist "%%j\" md "%%j" move "%%~i" "%%j\" ) Steffen for /f "tokens=* delims=." %%j in ("%%~xi") What is %%~xi? (you said i could ask... its easier than siftin...
- 05 Apr 2018 10:10
- Forum: DOS Batch Forum
- Topic: moving files
- Replies: 21
- Views: 17140
Re: moving files
five lines
it seems i still have a lot to learn.
it seems i still have a lot to learn.
- 05 Apr 2018 09:40
- Forum: DOS Batch Forum
- Topic: moving files
- Replies: 21
- Views: 17140
Re: moving files
add quotes to both variables in both if statements?
Code: Select all
if "!a:~-4!" == "%%b" (
move "!a!" "%%b"
) else if "!a:~-3!" == "%%b" (
move "!a!" "%%b"
) else (
REM
)
- 05 Apr 2018 09:17
- Forum: DOS Batch Forum
- Topic: moving files
- Replies: 21
- Views: 17140
Re: moving files
so put quotes around it, right?
Code: Select all
move "!a!" %%b
- 05 Apr 2018 08:44
- Forum: DOS Batch Forum
- Topic: moving files
- Replies: 21
- Views: 17140
Re: moving files
sorry, i forgot to change that part when i copied the code from my other post @echo off setlocal enabledelayedexpansion cd . set "list=pdf mp4 doc docx mov xls xlsx" for %%1 in (%list%) do (mkdir %%1) for /f "tokens=*" %%a in ('dir /b /o:n') do ( set a=%%a for %%b in (%list%) do ( if "!a:~-4!" == "%...
- 05 Apr 2018 08:36
- Forum: DOS Batch Forum
- Topic: moving files
- Replies: 21
- Views: 17140
Re: moving files
@echo off setlocal enabledelayedexpansion cd . set "list=pdf mp4 doc docx mov xls xlsx" for %%1 in (%list%) do (mkdir %%1) for /f "tokens=*" %%a in ('dir /b /o:n /a-d *.') do ( set a=%%a for %%b in (%list%) do ( if "!a:~-4!" == "%%b" ( robocopy !a! %%b /MOV ) else if "!a:~-3!" == "%%b" ( robocopy !...
- 05 Apr 2018 07:53
- Forum: DOS Batch Forum
- Topic: moving files
- Replies: 21
- Views: 17140
Re: moving files
try this: @echo off setlocal enabledelayedexpansion cd . set "list=pdf mp4 doc docx mov xls xlsx" for %%1 in (%list%) do (mkdir %%1) for /f "tokens=*" %%a in ('dir /b /o:n /a-d *.') do ( set a=%%a for %%b in (%list%) do ( if "!a:~-4!" == "%%b" ( move !a! %%b ) else if "!a:~-3!" == "%%b" ( move !a! %...
- 04 Apr 2018 08:15
- Forum: DOS Batch Forum
- Topic: file extensions
- Replies: 3
- Views: 4098
Re: file extensions
I spent the last hour and a half coming up with a code that is essentially the same as @aGerman's to answer the question, then i refreshed the page. anyway, here is the code (it looks almost the exact same) @echo off setlocal enabledelayedexpansion cd . set "list=jpeg docx png xlsx doc" for /f "toke...
- 03 Apr 2018 14:45
- Forum: DOS Batch Forum
- Topic: Xcopy help reading key
- Replies: 11
- Views: 10410
Re: Xcopy help reading key
Thank you, you have been a big help.
- 03 Apr 2018 14:18
- Forum: DOS Batch Forum
- Topic: Xcopy help reading key
- Replies: 11
- Views: 10410
Re: Xcopy help reading key
1. I read the topic, thanks for pointing me towards it. 2. I am in the western hemisphere, but the version of notepad++ that i have wont recognize the Û character in ANSI encoding, and changes the encoding to the ISO-whatever encoding, which has the л Character, and i'm not sure how to fix this (may...
- 03 Apr 2018 13:34
- Forum: DOS Batch Forum
- Topic: Xcopy help reading key
- Replies: 11
- Views: 10410
Re: Xcopy help reading key
edited the code posted here (about to edit the code in my other graphing calculator post) to show the "Û" char instead of the "л" char
- 03 Apr 2018 12:33
- Forum: DOS Batch Forum
- Topic: Xcopy help reading key
- Replies: 11
- Views: 10410
Re: Xcopy help reading key
but it does translate to the full █ block in the console window