There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Windows XP
Tag Cloud
access acer asus batch bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop lcd malware memory modem monitor motherboard network printer problem ram registry router slow software sound toshiba trojan usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless xbox
Search
Search for:
Tech Support Guy Forums > Operating Systems > Windows XP >
Recursive bash script or cmd to copy folder.jpg

Reply  
Thread Tools
devil_himself's Avatar
Distinguished Member with 4,922 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
14-Mar-2008, 11: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 89 posts.
 
Join Date: Nov 2006
Experience: Intermediate
14-Mar-2008, 02: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,922 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
14-Mar-2008, 10:07 PM #18
The "Copy" Should Begin From The Second Line .. ?
devil_himself's Avatar
Distinguished Member with 4,922 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
15-Mar-2008, 12:26 AM #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 89 posts.
 
Join Date: Nov 2006
Experience: Intermediate
16-Mar-2008, 01: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,922 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
16-Mar-2008, 04:36 AM #21
Are The *.jpg Files Hidden ?
sorrow's Avatar
Computer Specs
Member with 89 posts.
 
Join Date: Nov 2006
Experience: Intermediate
16-Mar-2008, 08:21 PM #22
I believe that they are considered system files -- so yes
devil_himself's Avatar
Distinguished Member with 4,922 posts.
 
Join Date: Apr 2007
Location: India
Experience: Advanced
16-Mar-2008, 10: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 89 posts.
 
Join Date: Nov 2006
Experience: Intermediate
18-Mar-2008, 03: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 89 posts.
 
Join Date: Nov 2006
Experience: Intermediate
19-Mar-2008, 12:16 AM #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 89 posts.
 
Join Date: Nov 2006
Experience: Intermediate
24-Mar-2008, 03:48 PM #26
Bump?
Reply

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.

Search Tech Support Guy

Find the solution to your
computer problem!




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



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 09:07 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.