Computing.Net > Forums > Programming > Forfiles command help

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Forfiles command help

Reply to Message Icon

Name: ali1903
Date: July 12, 2006 at 06:22:37 Pacific
OS: Windows Xp
CPU/Ram: P4 3.0g
Product: HP
Comment:

Hi I am looking for some help with the forfiles command. What I want to do is use for files to search the c drive for *ppt files the each time in finds one pass it to a batch file that moves it to a temp location then call a vb script to shrink the temp file. At the moment the code I have is as follows I am not sure how to pass the filename.

echo on
Cd c:\
c:\forfiles.exe

FORFILES -pC:\ -s -m*.ppt -c"CMD /c c:\allinonebat.bat @path@file"

(the batch file)
move %1 c:\temp\657465834639.ppt
IF %ERRORLEVEL% NEQ 0 goto end
cscript vbshrink.vbs 657465834639.ppt %1
del c:\temp\657465834639.ppt
:end



Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Forfiles command help

Batch File Command Help www.computing.net/answers/programming/batch-file-command-help/15409.html

Batch file commands help ! www.computing.net/answers/programming/batch-file-commands-help-/16201.html

Simple Batch File command help www.computing.net/answers/programming/simple-batch-file-command-help/16568.html