[DOS] Recognize paths with spaces ?

  • Thread starter Thread starter pasc
  • Start date Start date
  • Views Views 1,038
  • Replies Replies 2
P

pasc

Guest
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...
 
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 ).
 
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