Search found 5 matches

by Janning
21 Jun 2015 02:05
Forum: DOS Batch Forum
Topic: DOS batch file variable
Replies: 7
Views: 3307

Re: DOS batch file variable

Thanks, it all works very well...much appreciated!
by Janning
20 Jun 2015 21:14
Forum: DOS Batch Forum
Topic: DOS batch file variable
Replies: 7
Views: 3307

Re: DOS batch file variable

? are you saying that I "did"",,, or that I should? either way, I've tried every variations of "% and @...not just what I am posting on here. I get same error.
can u give me an example of what it should be?
thanks
by Janning
20 Jun 2015 18:15
Forum: DOS Batch Forum
Topic: DOS batch file variable
Replies: 7
Views: 3307

Re: DOS batch file variable

Hi,
I have already tried it without the quotes before making this post:

SET l_days = "-1"
forfiles.exe /p "B:\iCamSource_videos" /s /m *.jpg /d %l_days% /c "cmd /c del @file"

ERROR: Invalid syntax. Value expected for '/d'.
Type "FORFILES /?" for usage.
by Janning
20 Jun 2015 18:11
Forum: DOS Batch Forum
Topic: DOS batch file variable
Replies: 7
Views: 3307

Re: DOS batch file variable

Trying below: SET l_days = "-1" forfiles.exe /p "B:\iCamSource_videos" /s /m *.jpg /d %l_days% /c "cmd /c del @file" Gets error: (I should have noted I had already tried this before my post) E:\APPS\BATCH_JOBS>forfiles.exe /p "B:\iCamSource_videos" /s /m *.jpg...
by Janning
20 Jun 2015 17:22
Forum: DOS Batch Forum
Topic: DOS batch file variable
Replies: 7
Views: 3307

DOS batch file variable

Hi, I have an easy question. I'm using below in a batch file: forfiles.exe /p "B:\iCamSource_videos" /s /m *.jpg /d -11 /c "cmd /c del @file" The "-11" tells it to erase files older than 11 days. since this is one of many command lines I have, i'd like one variable to r...