Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Help] Batch - Remove Trailing Space

Featured Replies

I got another strange batch coding Q: that I cant seem to find the answer to...

I have a txt files with a list of files contained within it - Ex:

"C:\Documents and Settings\User\Local Settings\Temp\TDSS6784.tmp "

"C:\Documents and Settings\User\Local Settings\Temp\TDSS684f.tmp "

"C:\Documents and Settings\User\Local Settings\Temp\TDSS9f9b.tmp "

How do I remove the trailing space after the file extension?

looking at variable modifiers... %var:~0,-1% Should do what I need, however, how do I implement this to process all the lines in my txt file.

I could use an array, but I don't know the proper syntax of how to encorperate the modifier, as the below code does not work properly:

For /f "tokens=*" %%I in (FileList.txt) do SET Ifiles=%%I&&Echo %Ifiles:~0,-1%>>CorrectedFiles.txt

as it just places a bunch of ~0,-1 's in CorrectedFiles.txt

Do I have a typo, or is there a better way of doing this within a batch file?

Thanks a million

Well your biggest error was that you'd have needed to enable delayed expansion!

Here's an alternative

@Echo off&Setlocal enableextensions
For /f "delims=" %%# In (FileList.txt) Do Set "Ifiles=%%~#"&&Call :SUB %%Ifiles%%
Goto :Eof
:SUB
Echo:"%*">>CorrectedFiles.txt

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.