Search found 20 matches
- 06 Sep 2013 22:52
- Forum: DOS Batch Forum
- Topic: Copying a file to a new filename in each folder
- Replies: 12
- Views: 9459
Re: help sought
that worked, needed to remove /r switch which i assume is recursive. wanted to use xcopy, but would hang if >nul waiting for [F]ile or [D]irectory choice. why does this occur, is there a workaround? also it must limit the # of os, what's the cutoff, am i better to stick with COPY? Thanks, off to do ...
- 05 Sep 2013 23:02
- Forum: DOS Batch Forum
- Topic: Copying a file to a new filename in each folder
- Replies: 12
- Views: 9459
Re: help sought
yes fair comment, assumed to much obviously, ok then, each dir has a <dirname>.tbn [ThumBNail of cover artwork] which is just a jpg.
i wish to copy each to FOLDER.JPG in same dir as .tbn and loop to next directory.
i don't understand the %~ params, and wish to know more. ta, hth.
i wish to copy each to FOLDER.JPG in same dir as .tbn and loop to next directory.
i don't understand the %~ params, and wish to know more. ta, hth.
- 05 Sep 2013 01:14
- Forum: DOS Batch Forum
- Topic: Copying a file to a new filename in each folder
- Replies: 12
- Views: 9459
Re: help sought
have i p****** every1 off or does noone have a solution?? if former, sorry, cant think wot ive done, but no posts for nearly a week.
- 03 Sep 2013 00:12
- Forum: DOS Batch Forum
- Topic: Copying a file to a new filename in each folder
- Replies: 12
- Views: 9459
Re: help sought
hmmm thought for /d /r %%a in (*) do copy %%~fa\%%~na.tbn %%~fa\folder.jpg might work. but output is Z:\Movies\480 0-Z\0-9-A-B>copy Z:\Movies\480 0-Z\0-9-A-B\Blood Work\extrafanart\ extrafanart.tbn Z:\Movies\480 0-Z\0-9-A-B\Blood Work\extrafanart\folder.jpg The system cannot find the file specified....
- 30 Aug 2013 19:04
- Forum: DOS Batch Forum
- Topic: Copying a file to a new filename in each folder
- Replies: 12
- Views: 9459
Re: help sought
to proceed i know what to do, but not how. is there a list of those %% anywhere %%~fa seems to return the max absolute path avail, i want just the path of current path %cd% and one level up, not two. what the hey is nxa? for /d /r %%a in (*) do cd %%~fa & copy %%~na.tbn folder.jpg & cd.. wor...
- 29 Aug 2013 18:40
- Forum: DOS Batch Forum
- Topic: Copying a file to a new filename in each folder
- Replies: 12
- Views: 9459
Re: help sought
substituting %%~nxa for folder, i dont have to run to see its a diff way of achieving wat E did!, big thnks tho
- 29 Aug 2013 17:44
- Forum: DOS Batch Forum
- Topic: Copying a file to a new filename in each folder
- Replies: 12
- Views: 9459
Re: help sought
nearly bro, thnks, i removed the quotes. your snippet passes copy z:\movies\480 0-z\0-9-a-b\biss.tbn folder.jpg
which of course wont work, need copy biss\biss.tbn folder.jpg instead plse
which of course wont work, need copy biss\biss.tbn folder.jpg instead plse
- 29 Aug 2013 00:19
- Forum: DOS Batch Forum
- Topic: Copying a file to a new filename in each folder
- Replies: 12
- Views: 9459
Copying a file to a new filename in each folder
i need a batch that copies *.nfo to folder.jpg. it needs to work from root and process each subdir. worked fine in the subdir, but req a loop/nest to process each subdir - cd to it, do the copy, then cd back down a level. for %%a in (*.) do cd "%%a" & copy "%%~na".tbn folder....
- 11 May 2013 17:51
- Forum: DOS Batch Forum
- Topic: Batch file deleting itself issue
- Replies: 14
- Views: 15481
Re: Batch file deleting itself issue
The answer to the question: "How a Batch file can delete itself?" is: Place the DEL command (or any other command that remove the Batch file from its location) in a line that also terminate the execution: del myself.bat & exit /B Another possible way is place the DEL command in the la...
- 11 May 2013 17:47
- Forum: DOS Batch Forum
- Topic: Batch file deleting itself issue
- Replies: 14
- Views: 15481
Re: Batch file deleting itself issue
cheated added the line
and condition
Code: Select all
attrib +r nfo2dir2.bat
and condition
Code: Select all
if EXIST nfo2dir2 (
rd /s /q nfo2dir2
)
- 11 May 2013 01:17
- Forum: DOS Batch Forum
- Topic: Batch file deleting itself issue
- Replies: 14
- Views: 15481
Re: Batch file deleting itself issue
ic whats going on!
its moving the batch to the nfo2dir2 dir it correctly makes..doh,
how to stop it happening?
its moving the batch to the nfo2dir2 dir it correctly makes..doh,
how to stop it happening?
- 10 May 2013 22:56
- Forum: DOS Batch Forum
- Topic: Batch file deleting itself issue
- Replies: 14
- Views: 15481
Batch file deleting itself issue
when run without commandline, AOK, but when run with, alls not well. the routine halts with a batch not found error, and the batch is, you guessed it, MIA. how it gets deleted when you'd expect it to have "access denied" attribs while running is anyones guess! you can test it by running wi...
- 10 May 2013 00:47
- Forum: DOS Batch Forum
- Topic: nested mess
- Replies: 2
- Views: 4288
nested mess
i tried combining new code to original batch. what i assumed would be a simple condition test for %1 and if true run 1 section, else run nother. nah not that simple! @@cls @ECHO Off COLOR 0e if "%~1" == "" ( IF not EXIST NFO2DIR2.TXT ( ECHO Ensure your've read nfo2dir2.txt before...
- 05 May 2013 22:41
- Forum: DOS Batch Forum
- Topic: HLP BEGGED!
- Replies: 14
- Views: 15182
Re: HLP BEGGED!
perfect, ur the man.
all i did was add 1/2doz probable delimiters, and wildcards to that block.
thanks for your help abc0502
all i did was add 1/2doz probable delimiters, and wildcards to that block.
thanks for your help abc0502
- 04 May 2013 16:14
- Forum: DOS Batch Forum
- Topic: HLP BEGGED!
- Replies: 14
- Views: 15182
Re: HLP BEGGED!
wow, so close now.thanx, hang in there! issue still with SET "DirName=!FName:~0, -4! " is assuming %1 will always be 4 chars, what about say -disk1, which is 6? hence my routine that counted chars parsed. also this block [processfiles] a nogo IF EXIST "%%~dpA!DirName!-fanart.*" M...