Search found 3 matches

by KipKasper
21 Jan 2011 10:13
Forum: DOS Batch Forum
Topic: Remove leading characters and pass to new variable
Replies: 4
Views: 7665

Re: Remove leading characters and pass to new variable

You can remove the "\\some.server..." with a better use of for and not be bound to a certain number of characters like below. for /f "tokens=1* delims=\" %%a in (output.log) do echo %%b will give you: c$\storage\folder\with\stuff\init.jpg c$\storage\folder\with\stuff\more.jpg c$...
by KipKasper
21 Jan 2011 10:11
Forum: DOS Batch Forum
Topic: Remove leading characters and pass to new variable
Replies: 4
Views: 7665

Re: Remove leading characters and pass to new variable

untested: This part: !filenames:~73,0! will return 0 characters skipping the first 72 characters. I believe you want: !filenames:~73! Which just skips the first 72 characters and returns everything else. Thanks avery_larry! I had just looked that function up, I've never used it before, so I'm not s...
by KipKasper
20 Jan 2011 14:36
Forum: DOS Batch Forum
Topic: Remove leading characters and pass to new variable
Replies: 4
Views: 7665

Remove leading characters and pass to new variable

Hi All, I have a log listing fully qualified file names that need to be copied. ie. \\some.server.domain.ca\c$\storage\folder\with\stuff\init.jpg \\some.server.domain.ca\c$\storage\folder\with\stuff\more.jpg \\some.server.domain.ca\c$\storage\folder\with\stuff\again.tif the bit of code I'm fighting ...