Search found 8 matches
- 07 Nov 2012 10:41
- Forum: DOS Batch Forum
- Topic: Creating Symbolic and Hard Links with a Batch File
- Replies: 16
- Views: 19386
Re: Simple (?) DelayedExpansion / String Problems [NOOB]
Good to know. Just ran the final version of the batch on a sample of the files, and it worked fantastic! However, if anyone is looking at how to batch the creation of symbolic- or hard- links, note that you need Administrative rights in your batch script. I found this block of code, pasted at the to...
- 07 Nov 2012 09:28
- Forum: DOS Batch Forum
- Topic: Creating Symbolic and Hard Links with a Batch File
- Replies: 16
- Views: 19386
Re: Simple (?) DelayedExpansion / String Problems [NOOB]
You're absolutely right, foxidrive, and I understand you're frustrated. Sorry about that. Thing is, some of the files and pathnames I'm shifting around are sensitive and I had to use discretion with names and paths. Nonetheless, your code was indeed helpful and very much appreciated, and in fact I t...
- 07 Nov 2012 07:55
- Forum: DOS Batch Forum
- Topic: Creating Symbolic and Hard Links with a Batch File
- Replies: 16
- Views: 19386
Re: Simple (?) DelayedExpansion / String Problems [NOOB]
Interesting take foxidrive, thanks for the input. The trouble with your version is that I'm running this batch one folder up from the source and destination folders, and relative paths must be used for the source and destination vars. I need to figure out how to run the FOR loop in a way that I allo...
- 06 Nov 2012 15:25
- Forum: DOS Batch Forum
- Topic: Creating Symbolic and Hard Links with a Batch File
- Replies: 16
- Views: 19386
Re: Simple (?) DelayedExpansion / String Problems [NOOB]
That'd be excellent, timbertuck. Your help's worth the wait, because this just went way over my head!
The premise is simple, but making the for loop recursive is really confusing me.
The premise is simple, but making the for loop recursive is really confusing me.
- 06 Nov 2012 14:55
- Forum: DOS Batch Forum
- Topic: Creating Symbolic and Hard Links with a Batch File
- Replies: 16
- Views: 19386
Re: Simple (?) DelayedExpansion / String Problems [NOOB]
OK, so this is *almost* in working condition. The one thing I can't seem to figure out is how to get the MKDIR to act recursively. Instead of recreating the subdirectories a few levels deep, it's creating all subdirectories as first-level ones under the main one Also, I gave some bad example path na...
- 06 Nov 2012 13:59
- Forum: DOS Batch Forum
- Topic: Creating Symbolic and Hard Links with a Batch File
- Replies: 16
- Views: 19386
Re: Simple (?) DelayedExpansion / String Problems [NOOB]
Der! Thank you so much timbertuck, that's what I needed! FOR /F "USEBACKQ DELIMS=|" %%G IN (`dir /B /S /A:-D "X"`) DO ( ECHO %%G >> FILESINLOOP.txt ECHO MKLINK "Y\%%~nG" %%G The only problem I have now is that I won't preserve any subdirectory structure-- which is why ...
- 06 Nov 2012 13:43
- Forum: DOS Batch Forum
- Topic: Creating Symbolic and Hard Links with a Batch File
- Replies: 16
- Views: 19386
Re: Simple (?) DelayedExpansion / String Problems [NOOB]
Thanks for the input, timbertuck, however I think your nested FOR loop confused me more than it helped . The main issue I'm having with the original code is the %%G parameter in the FOR loop. FOR /F "USEBACKQ DELIMS=|" %%G IN (`dir /B /S /A:-D "X"`) DO ( ECHO %%G >> FILESINLOOP.t...
- 06 Nov 2012 10:54
- Forum: DOS Batch Forum
- Topic: Creating Symbolic and Hard Links with a Batch File
- Replies: 16
- Views: 19386
Creating Symbolic and Hard Links with a Batch File
I'm trying to write a batch file that will take the files in folder X (has subdirectories) and create absolute symbolic links with the same filename and directory structure in folder Y (I want ACTUAL folders, only files as symlinks). I already have this so far, but I'm stuck because I don't understa...