Become a Site Supporter and Never see Ads again!

Author Topic: Need a couple DOS commands  (Read 2959 times)

0 Members and 1 Guest are viewing this topic.

Offline blu666z

  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 3277
  • AT ES943(H/C/O caps) » JKLab PP9 Pre » wmod UA-5
Need a couple DOS commands
« on: January 21, 2004, 02:08:11 AM »
Working on a batch file to run through the process I manually do everytime I convert a tape.  Need help with a couple commands.  
1.  After I fix sector boundries I need a command to delete the original file that was fixed and remove the 'fixed' from the new version.

2. Is there a way to retrieve the folder you are in and use that as a variable?  ie.  I want to name the MD5 file the same name as the folder it resides in.

-Kevin

jpschust

  • Guest
  • Trade Count: (0)
Re:Need a couple DOS commands
« Reply #1 on: January 21, 2004, 10:08:49 AM »
ok the dos command to delete anything is:

del thisismyshinfixed.* (del is the command, the stars go in place of anythign you dont feel like typing out)

i think the rename command is ren, but thats from a long time ago

Offline Nick in Edinboro

  • Wishes he was fishing right now...
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 2924
  • Gender: Male
  • Toshiba SD3690 > HK AR-20 > B&K ST-140 > Axiom M22
    • moepics.com - share your shots of moe.
Re:Need a couple DOS commands
« Reply #2 on: January 21, 2004, 11:23:31 AM »
Quote
Is there a way to retrieve the folder you are in and use that as a variable?

call your bat file with an additional parameter which is your folder
ex.
C:\> docleanup.bat foldername

ex2.
C:> docleanup.bat dtb2003_03_23

Use of variable in code
docleanup.bat

echo The folder you are using is %1
ren *.md5 %1.md5

Oktava MC012's (dorseymod) > UA-5 (digmod) > JB3
http://braintuba.no-ip.com

Offline Nick in Edinboro

  • Wishes he was fishing right now...
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 2924
  • Gender: Male
  • Toshiba SD3690 > HK AR-20 > B&K ST-140 > Axiom M22
    • moepics.com - share your shots of moe.
Re:Need a couple DOS commands
« Reply #3 on: January 21, 2004, 11:24:28 AM »
DOS Scripting is fun for me.. I have a whole lot more examples and stuff at home, including one where I traverse folders but I don't have it here at work.  Kevin, if your interested leave a note here and I'll dig them up at some point tonight.

Take care,
Nick
Oktava MC012's (dorseymod) > UA-5 (digmod) > JB3
http://braintuba.no-ip.com

Offline Nick in Edinboro

  • Wishes he was fishing right now...
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 2924
  • Gender: Male
  • Toshiba SD3690 > HK AR-20 > B&K ST-140 > Axiom M22
    • moepics.com - share your shots of moe.
Re:Need a couple DOS commands
« Reply #4 on: January 21, 2004, 11:33:27 AM »
Actually in thinking about it, you wouldn't need to feed the script the directory your in.

You could just tell the .bat file to do a CD command which will give you your directory, put it into a variable, parse it, and there you go.

I have some programs at home where I do something similar but instead I ping computers to see if they're alive or dead by grabbing a string from the results of the ping command.
Oktava MC012's (dorseymod) > UA-5 (digmod) > JB3
http://braintuba.no-ip.com

Offline Nick in Edinboro

  • Wishes he was fishing right now...
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 2924
  • Gender: Male
  • Toshiba SD3690 > HK AR-20 > B&K ST-140 > Axiom M22
    • moepics.com - share your shots of moe.
Re:Need a couple DOS commands
« Reply #5 on: January 21, 2004, 11:48:24 AM »
These should help put you on the right path, was starting to write something out for you but realized I gotta go in like 5 minutes.

Stuff on deleting files

Shows how to strip a file of it's extension, might come in handy plus all sorts of other stuff, however not organized very well
Oktava MC012's (dorseymod) > UA-5 (digmod) > JB3
http://braintuba.no-ip.com

Offline blu666z

  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 3277
  • AT ES943(H/C/O caps) » JKLab PP9 Pre » wmod UA-5
Re:Need a couple DOS commands
« Reply #6 on: January 21, 2004, 07:27:55 PM »
ok the dos command to delete anything is:

del thisismyshinfixed.* (del is the command, the stars go in place of anythign you dont feel like typing out)

i think the rename command is ren, but thats from a long time ago


I know what the command is just trying to automate the process.  ie. In my folder I have:
mel2004-01-17d1t07.wav
mel2004-01-17d1t07-fixed.wav

Looking for a way to delete original wavs where they have been fixed and then remove the '-fixed' extension.

-Kevin

Offline blu666z

  • Trade Count: (1)
  • Needs to get out more...
  • *****
  • Posts: 3277
  • AT ES943(H/C/O caps) » JKLab PP9 Pre » wmod UA-5
Re:Need a couple DOS commands
« Reply #7 on: January 21, 2004, 07:29:32 PM »
Probably get stoned tonite and work on this.  That always seem to help me program for some reason.  To bad the real boss can't understand that!

-Kevin

Offline Nick in Edinboro

  • Wishes he was fishing right now...
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 2924
  • Gender: Male
  • Toshiba SD3690 > HK AR-20 > B&K ST-140 > Axiom M22
    • moepics.com - share your shots of moe.
Re:Need a couple DOS commands
« Reply #8 on: January 29, 2004, 04:37:44 PM »
Probably get stoned tonite and work on this.  That always seem to help me program for some reason.  To bad the real boss can't understand that!

Kevin how did this turn out for you?  Get anything (besides the munchies)? ;)

I too, enjoy a little  :smoking: to help the creative/logic juices flow when I get the opportunity to work from home (contract jobs or hw, etc.).  

"Work work" is another story, do believe I'd just fall asleep in my cube :lol:
Oktava MC012's (dorseymod) > UA-5 (digmod) > JB3
http://braintuba.no-ip.com

Offline Cooker

  • Local Crew
  • Trade Count: (0)
  • Needs to get out more...
  • *****
  • Posts: 8720
  • Gender: Male
Re:Need a couple DOS commands
« Reply #9 on: January 30, 2004, 11:58:10 AM »
kevin, i have been wanting a batch file to strip the -fixed off of my files for some time. if only shntool had a suffix parameter...

also, i don't know if you knew this, but shntool can do the fixing and converting all in one step. no real need for you to have "XXXX-fixed.wav" on your pc at all - you can just tell it -o flac or  -o shn

you still have to get rid of that nasty -fixed suffix, but it makes deleting the original files that much easire (del *.shn)

 

RSS | Mobile
Page created in 0.076 seconds with 35 queries.
© 2002-2024 Taperssection.com
Powered by SMF