[DOS] Recognize paths with spaces ?

  • Thread starter pasc
  • Start date
  • Views 917
  • Replies 2
P

pasc

Guest
OP
Well the problem is as following:

I have a script that must handle paths with spaces in them.

I know that putting quotation marks around said path's works in some "rare" cases , however the path I have for example looks liket this:

C:\Path to\extremely long and unwinding\file.png

Any ideas ? (I swear there was a way to put something on top of a DOS batch file to make it recognize spaces in file paths/names afterwards...
 

FAST6191

Techromancer
Editorial Team
Joined
Nov 21, 2005
Messages
36,798
Trophies
3
XP
28,348
Country
United Kingdom
I have had issues with things needing flags and piping in certain arrangements when it comes to using quotes if I am going to call a distant executable but quotes are an accepted part of DOS command generation. This is mainly as windows style command line is not quite so robust as unix style ones but that is a different discussion assuming I do not say something like have you considered cygwin for this?

Cheating bastard method- add the "C:\Path to\extremely long and unwinding\" directory to your path, in Windows/MS style DOS the temporary version is SET ( http://www.ats.ucla.edu/stat/hlm/path.htm ).
 
P

pasc

Guest
OP
The problem is I need this to work with variable paths:

Code:
@echo off
SET /P path=Drag and Drop the folder containing the files that should be analyzed for dup(licate) files:
dupf.exe "%path%"
> dup.txt
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • K3Nv2 @ K3Nv2:
    Yeah I wanted to see shards of the titanic
  • BigOnYa @ BigOnYa:
    I kept thinking jaws was gonna come up and attack
  • K3Nv2 @ K3Nv2:
    Jaws is on a diet
  • K3Nv2 @ K3Nv2:
    Damn power went out
  • BigOnYa @ BigOnYa:
    Ok xdqwerty, your little bro prob tripped On the cord and unplugged you
  • K3Nv2 @ K3Nv2:
    Ya I'm afraid of the dark hug me
  • BigOnYa @ BigOnYa:
    Grab and hold close your AncientBoi doll.
  • K3Nv2 @ K3Nv2:
    Damn didn't charge my external battery either
  • BigOnYa @ BigOnYa:
    Take the batteries out of your SuperStabber3000... Or is it gas powered?
  • K3Nv2 @ K3Nv2:
    I stole batteries from your black mamba
    +1
  • K3Nv2 @ K3Nv2:
    My frozen food better hold up for an hour I know that
  • BigOnYa @ BigOnYa:
    Or else gonna be a big lunch and dinner tomorrow.
  • BigOnYa @ BigOnYa:
    Did you pay your power bill? Or give all yo money to my wife, again.
  • K3Nv2 @ K3Nv2:
    Oh good the estimated time is the same exact time they just said
    +1
  • BigOnYa @ BigOnYa:
    Load up your pc and monitor, and head to a McDonalds dining room, they have free WiFi
  • K3Nv2 @ K3Nv2:
    Sir please watch your porn in the bathroom
    +2
  • BigOnYa @ BigOnYa:
    No sir we can not sell you anymore apple pies, after what you did with the last one.
  • K3Nv2 @ K3Nv2:
    We ran out
  • HiradeGirl @ HiradeGirl:
    for your life
    +1
  • K3Nv2 @ K3Nv2:
    My life has no value my fat ass is staying right here
  • K3Nv2 @ K3Nv2:
    Nearly 4 hours without power :(
    K3Nv2 @ K3Nv2: Nearly 4 hours without power :(