Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Windows XP
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop drivers dvd email error excel excel 2003 firefox hard drive hardware hijackthis internet keyboard laptop malware monitor motherboard network networking outlook problem processor ram recovery router safe mode screen slow sound spyware tdlwsp.dll trojan video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Windows XP >
Recursive bash script or cmd to copy folder.jpg

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
devil_himself's Avatar
Distinguished Member with 4,921 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
14-Mar-2008, 10:20 AM #16
Post #13 ..

You Need To Change This Line TO The Path To You Directory

pushd "c:\pictures"
sorrow's Avatar
Computer Specs
Member with 79 posts.
 
Join Date: Nov 2006
Experience: Intermediate
14-Mar-2008, 01:03 PM #17
Yeah, I've been changing it to the respective directory.. here is the output:

Code:
C:\Documents and Settings\insanity.FIDO\Desktop\Temp Music\Rage Against The Machine\Evil Empire\ZuneAlbumArt.jpg copy 
"C:\Documents and Settings\insanity.FIDO\Desktop\Temp Music\Rage Against The Machine\Evil Empire\ZuneAlbumArt.jpg" 
"C:\Documents and Settings\insanity.FIDO\Desktop\Temp Music\Rage Against The Machine\Evil Empire\folder.jpg"
Press any key to continue . . .
devil_himself's Avatar
Distinguished Member with 4,921 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
14-Mar-2008, 09:07 PM #18
The "Copy" Should Begin From The Second Line .. ?
devil_himself's Avatar
Distinguished Member with 4,921 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
14-Mar-2008, 11:26 PM #19
Try This

Change The Path To Your Directory
It Is In Debug Mode ... Remove Echo From Last Line To Actually Make It Copy The Files

Quote:
@echo off
for /f "tokens=*" %%a in ('dir c:\pictures\*.jpg /b /s /-c /a:-d-s-h') do (
call :PROCESS "%%a")
endlocal
goto :EOF
:PROCESS
setlocal
set dr=%~d1& set pth=%~p1& set base=%~n1& set ext=%~x1
echo copy "%dr%%pth%%base%%ext%" "%dr%%pth%folder.jpg"
sorrow's Avatar
Computer Specs
Member with 79 posts.
 
Join Date: Nov 2006
Experience: Intermediate
16-Mar-2008, 12:48 AM #20
Ok, now I'm really perplexed -- when I double click on the bat file, nothing happens. Then when I navigate to the file in the command line and try to execute it, it tells me that "The system cannot find the path specified." Even if I manually navigated to the folder & am sure that the file is in that folder..?

Edit - that is with and without echo on, and I even tried moving & renaming the file with no more luck and I have changed the c:\pictures to the appropriate directory.
devil_himself's Avatar
Distinguished Member with 4,921 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
16-Mar-2008, 03:36 AM #21
Are The *.jpg Files Hidden ?
sorrow's Avatar
Computer Specs
Member with 79 posts.
 
Join Date: Nov 2006
Experience: Intermediate
16-Mar-2008, 07:21 PM #22
I believe that they are considered system files -- so yes
devil_himself's Avatar
Distinguished Member with 4,921 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
16-Mar-2008, 09:58 PM #23
Quote:
Originally Posted by sorrow View Post
I believe that they are considered system files -- so yes
Made To Look At System And Hidden Files

Code:
@echo off
for /f "tokens=*" %%a in ('dir c:\pictures\*.jpg /b /s /-c /a:-d') do (
call :PROCESS "%%a")
endlocal
goto :EOF
:PROCESS
setlocal
set dr=%~d1& set pth=%~p1& set base=%~n1& set ext=%~x1
echo copy "%dr%%pth%%base%%ext%" "%dr%%pth%folder.jpg"
sorrow's Avatar
Computer Specs
Member with 79 posts.
 
Join Date: Nov 2006
Experience: Intermediate
18-Mar-2008, 02:47 AM #24
I get the feeling that a specific command may be throwing it off because I'm still running into the "System cannot find the path specified." error. I've tried tweaking the directory a bit & moving things around but still no luck..

Thanks for sticking with this so long!
sorrow's Avatar
Computer Specs
Member with 79 posts.
 
Join Date: Nov 2006
Experience: Intermediate
18-Mar-2008, 11:16 PM #25
What about trying a potentially simpler direct command with something like,
Code:
for /R %d in (.) do copy %nxI d\z*.jpg %d\Folder.jpg
and telling it to look at the system files there?
sorrow's Avatar
Computer Specs
Member with 79 posts.
 
Join Date: Nov 2006
Experience: Intermediate
24-Mar-2008, 02:48 PM #26
Bump?
Closed Thread Bookmark and Share

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Smart Search

Find your solution!



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.

Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 01:45 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.